-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
polymorphic associations causes exception #385
Comments
Hi, remote: git://github.com/sferik/rails_admin.git |
Do you have |
Of course |
Ok, does the problem go away if you declare parent as symbol
|
yes, works fine. Could you please fix it with declaration as string? |
Closed by 0e2c1d4 |
Hi,
i have model called Flag
class Flag < ActiveRecord::Base
attr_accessible :report_type, :flaggeable_id, :flaggeable_type, :return_to
########## Associations
belongs_to :author, :class_name => "User"
belongs_to :flaggeable, :polymorphic => true
end
and when i attempting to access this model from rails_admin i see error
NoMethodError in RailsAdmin::MainsController#list
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.map
Full traces - http://pastie.org/1840863
But, when i have commented line belongs_to :flaggeable, :polymorphic => true everything works fine.
Could you check please work with polymorphs?
The text was updated successfully, but these errors were encountered: