mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-15 16:56:32 +01:00
Override #to_s on Tag for simplified joining
This commit is contained in:
parent
01b7f78f3c
commit
0b733b6183
3 changed files with 11 additions and 2 deletions
|
|
@ -127,7 +127,7 @@ module TodosHelper
|
|||
end
|
||||
|
||||
def tag_list_text(todo=@todo)
|
||||
todo.tags.collect{|t| t.name}.join(', ')
|
||||
todo.tags.join(', ')
|
||||
end
|
||||
|
||||
def tag_span (tag, mobile=false)
|
||||
|
|
|
|||
|
|
@ -30,4 +30,8 @@ class Tag < ActiveRecord::Base
|
|||
@label ||= name.gsub(' ', '-')
|
||||
end
|
||||
|
||||
def to_s
|
||||
name
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue