mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-26 18:56:10 +01:00
Removed superfluous 'tracks' directory at the root of the repository.
Testing commits to github.
This commit is contained in:
parent
6a42901514
commit
4cbf5a34d3
2269 changed files with 0 additions and 0 deletions
11
app/models/tag.rb
Normal file
11
app/models/tag.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
class Tag < ActiveRecord::Base
|
||||
has_many_polymorphs :taggables,
|
||||
:from => [:todos],
|
||||
:through => :taggings,
|
||||
:dependent => :destroy
|
||||
|
||||
def on(taggable, user)
|
||||
tagging = taggings.create :taggable => taggable, :user => user
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue