mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-04 08:18:50 +01:00
refactorings for recurring todo model
This commit is contained in:
parent
80e47b94b0
commit
885ee7d1d1
3 changed files with 101 additions and 137 deletions
|
|
@ -39,6 +39,10 @@ module IsTaggable
|
|||
self
|
||||
end
|
||||
|
||||
def has_tag?(tag_name)
|
||||
return tags.any? {|tag| tag.name == tag_name}
|
||||
end
|
||||
|
||||
# Add tags to <tt>self</tt>. Accepts a string of tagnames, an array of tagnames, or an array of Tags.
|
||||
#
|
||||
# We need to avoid name conflicts with the built-in ActiveRecord association methods, thus the underscores.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue