Class: Odania::Content
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Odania::Content
- Defined in:
- app/models/odania/content.rb
Instance Method Summary collapse
Instance Method Details
#to_param ⇒ Object
18 19 20 |
# File 'app/models/odania/content.rb', line 18 def to_param "#{self.id}-#{self.title.parameterize}" end |
#validate_widget ⇒ Object
22 23 24 25 26 |
# File 'app/models/odania/content.rb', line 22 def if !self..nil? and !self.site_id.eql?(self..site_id) errors.add(:widget_id, 'invalid widget') end end |