Class: Blogrrr::Article
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Blogrrr::Article
- Defined in:
- app/models/blogrrr/article.rb
Instance Attribute Summary collapse
-
#author_name ⇒ Object
Returns the value of attribute author_name.
Instance Method Summary collapse
Instance Attribute Details
#author_name ⇒ Object
Returns the value of attribute author_name.
3 4 5 |
# File 'app/models/blogrrr/article.rb', line 3 def @author_name end |
Instance Method Details
#tag_list ⇒ Object
11 12 13 |
# File 'app/models/blogrrr/article.rb', line 11 def tag_list .join(", ") end |
#tag_list=(tags_string) ⇒ Object
15 16 17 18 19 |
# File 'app/models/blogrrr/article.rb', line 15 def tag_list=() tag_names = .split(",").collect{|s| s.strip.downcase}.uniq = tag_names.collect { |name| Tag.find_or_create_by(name: name) } self. = end |