Ruby on Rails
Friday, July 3, 2015
Oh yeah, this is because of one gem i use that extends AR in that way. Thanks that you set up fresh app, that helped me.
вторник, 30 июня 2015 г., 14:24:02 UTC+3 пользователь Frederick Cheung написал:
-- вторник, 30 июня 2015 г., 14:24:02 UTC+3 пользователь Frederick Cheung написал:
On Monday, June 29, 2015 at 7:40:58 PM UTC+1, Мурыгин Антон wrote:My rails version is 4.2.2.Weird - I created a fresh rails app, added a business model like yours and it works fine. I'd recommended doing the same and seeing whether you can isolate what it is about your app that is different (for example is Business::GeneratedAssociationMethods in the ancestor chain for business? What does Profile:: GeneratedAssociationMethods. instance_methods look like?) Fredпонедельник, 29 июня 2015 г., 20:00:27 UTC+3 пользователь Frederick Cheung написал:
On Monday, June 29, 2015, Мурыгин Антон <mib...@gmail.com> wrote:Now this is my modelclass Business < ActiveRecord::Base
belongs_to :category, class_name: 'BusinessCategory', foreign_key: 'business_category_id'def categorysuper || BusinessCategory.new(name: 'other')endend
Why it keeps throwing? Am i missing something?super: no superclass method `category' for #<Business:0x000001023014b8>Which version of rails?Fred--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com .
To post to this group, send email to rubyonrails-talk@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ .fabf3f0c-db07-44b4-a04c- 0b060eb9eaa5%40googlegroups. com
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/51160eca-1893-48e3-b45e-602bf03e575c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment