Module: EnjuBookmark::BookmarkManifestation::ClassMethods
- Defined in:
- lib/enju_bookmark/manifestation.rb
Instance Method Summary collapse
Instance Method Details
#enju_bookmark_manifestation_model ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/enju_bookmark/manifestation.rb', line 8 def enju_bookmark_manifestation_model include InstanceMethods has_many :bookmarks, dependent: :destroy, foreign_key: :manifestation_id has_many :users, through: :bookmarks searchable do string :tag, multiple: true do bookmarks.map{|bookmark| bookmark.tag_list}.flatten end text :tag do bookmarks.map{|bookmark| bookmark.tag_list}.flatten end end end |