Method: Catche::Tag::Object#tags
- Defined in:
- lib/catche/tag/object.rb
#tags(initialized_object) ⇒ Object
Returns the tags for the given object. If ‘bubble` is set to true it will pass along the separate tag for each association. This means the collection or resource is expired as soon as the association changes.
object = Catche::Tag::Object.new(Task, TasksController, :through => [:user, :project])
object.(controller.new) => ['users_1_projects_1_tasks_1']
76 77 78 79 80 81 82 83 |
# File 'lib/catche/tag/object.rb', line 76 def (initialized_object) = [] += (initialized_object) if bubble? += (initialized_object) end |