Class: Effective::CarouselItem

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/effective/carousel_item.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#current_userObject

Returns the value of attribute current_user.



8
9
10
# File 'app/models/effective/carousel_item.rb', line 8

def current_user
  @current_user
end

Instance Method Details

#bodyObject

As per has_many_rich_texts



69
70
71
# File 'app/models/effective/carousel_item.rb', line 69

def body
  rich_text_body
end

#numberObject



73
74
75
# File 'app/models/effective/carousel_item.rb', line 73

def number
  '#' + position.to_s
end

#to_sObject



64
65
66
# File 'app/models/effective/carousel_item.rb', line 64

def to_s
  persisted? ? [carousel, number].join(' ') : model_name.human
end