Class: Blogaze::Models::Tag
- Inherits:
-
Sequel::Model
- Object
- Sequel::Model
- Blogaze::Models::Tag
- Defined in:
- lib/blogaze/models/tag.rb
Overview
Tags model
Instance Method Summary collapse
- #before_save ⇒ Object
-
#href ⇒ String
Returns the URI to the page listing posts belonging to the tag.
Instance Method Details
#before_save ⇒ Object
25 26 27 |
# File 'lib/blogaze/models/tag.rb', line 25 def before_save self.slug = Innate::Helper::CGI.u(self.name.scan(/\w+/).join('-')).downcase end |
#href ⇒ String
Returns the URI to the page listing posts belonging to the tag.
21 22 23 |
# File 'lib/blogaze/models/tag.rb', line 21 def href "/tags/#{slug}" end |