Class: Tag::PostsAssociation
- Inherits:
-
ActiveRecord::Associations::HasManyAssociation
- Object
- ActiveRecord::Associations::HasManyAssociation
- Tag::PostsAssociation
- Defined in:
- lib/ecrire/app/models/tag.rb
Instance Method Summary collapse
Instance Method Details
#scope(opts = {}) ⇒ Object
54 55 56 |
# File 'lib/ecrire/app/models/tag.rb', line 54 def scope(opts = {}) Post.where('? = ANY (posts.tags)', owner.id).order('published_at DESC') end |