Add Tag#label method

This commit is contained in:
Katrina Owen 2013-02-18 15:01:56 -07:00
parent f56fc1945c
commit 95a4ed6e4a
4 changed files with 10 additions and 2 deletions

View file

@ -26,4 +26,8 @@ class Tag < ActiveRecord::Base
taggings.create :taggable => taggable, :user => user
end
def label
@label ||= name.gsub(' ', '-')
end
end