Skip to content
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

Don't read attribute from associative field collection #1571

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/administrate/page/base.rb
Expand Up @@ -32,7 +32,9 @@ def attribute_field(dashboard, resource, attribute_name, page)
end

def get_attribute_value(resource, attribute_name)
resource.public_send(attribute_name)
unless resource.is_a? ActiveRecord::Associations::CollectionProxy
resource.public_send(attribute_name)
end
end

attr_reader :dashboard, :options
Expand Down