Sha256: e1c77c19d98c0d28979a69b0e41cfb04e3eec61f0943c46994e4c1c3c29c42ff

Contents?: true

Size: 347 Bytes

Versions: 6

Compression:

Stored size: 347 Bytes

Contents

class Company < ActiveRecord::Base
  make_taggable :locations, :markets

  has_many :markets, through: :market_taggings, source: :tag

  private

  def find_or_create_tags_from_list_with_context(tag_list, context)
    if context.to_sym == :markets
      Market.find_or_create_all_with_like_by_name(tag_list)
    else
      super
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
make_taggable-0.7.1 spec/dummy/app/models/company.rb
make_taggable-0.7.0 spec/dummy/app/models/company.rb
make_taggable-0.6.6 spec/dummy/app/models/company.rb
make_taggable-0.6.5 spec/dummy/app/models/company.rb
make_taggable-0.6.4 spec/dummy/app/models/company.rb
make_taggable-0.6.3 spec/dummy/app/models/company.rb