Class: PagesCms::Article
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- PagesCms::Article
- Defined in:
- app/models/pages_cms/article.rb
Class Method Summary collapse
-
.all_tags ⇒ Object
tagging.
Instance Method Summary collapse
Class Method Details
.all_tags ⇒ Object
tagging
11 12 13 |
# File 'app/models/pages_cms/article.rb', line 11 def self. self.all.pluck(:tags).flatten.uniq end |
Instance Method Details
#tagging=(val) ⇒ Object
15 16 17 |
# File 'app/models/pages_cms/article.rb', line 15 def tagging=(val) write_attribute(:tags, val.split(',')) end |
#to_param ⇒ Object
6 7 8 |
# File 'app/models/pages_cms/article.rb', line 6 def to_param "#{id}-#{title.parameterize}" end |