Module: SpreeCmCommissioner::TaxonomyDecorator
- Defined in:
- app/models/spree_cm_commissioner/taxonomy_decorator.rb
Class Method Summary collapse
Class Method Details
.prepended(base) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'app/models/spree_cm_commissioner/taxonomy_decorator.rb', line 3 def self.prepended(base) base.include SpreeCmCommissioner::TaxonKind def base.businesses ActiveRecord::Base.connected_to(role: :writing) do Spree::Taxonomy.find_or_create_by(name: 'Businesses', kind: 'category', store: Spree::Store.default) end end end |