spree-contrib / spree_static_content

Manage static pages for Spree Commerce.
http://guides.spreecommerce.org
BSD 3-Clause "New" or "Revised" License
217 stars 333 forks source link

methods `find_by` stop working #253

Closed NuclearMachine closed 6 years ago

NuclearMachine commented 6 years ago

find_by_permalink,find_by_taxonomyETC completely breaks. Please fix.

NuclearMachine commented 6 years ago
2.4.1 :005 > Spree::Taxon.find_by_permalink 'category/flower'
NoMethodError: undefined method `find_by_permalink' for #<Class:0x000000094fcc58>
2.4.1 :001 > Spree::Taxonomy.find_by_name("Category")
NoMethodError: undefined method `find_by_name' for #<Class:0x0000000c57f268>
VygovskySergey commented 6 years ago

@NuclearMachine Is it just problem with spree_static_content, or you have the same problem for regular spree application?

NuclearMachine commented 6 years ago

@VygovskySergey the said methods worked completely fine until i bundled the spree_static_content gem and its prerequisites with my app

VygovskySergey commented 6 years ago

@NuclearMachine Thanks, I will try to configure what is going wrong

VygovskySergey commented 6 years ago

@NuclearMachine I think i got what the problem with this, after you added spree_globalize,taxons fields like name, description, permalink is going to another model, so basically you dont have these fields in your model.