Browse files

Fix calls to object_label in sections to point to model config

  • Loading branch information...
1 parent 6bf3482 commit 3b593947526cb59665999f453e11320842fe220d @kaapa kaapa committed Mar 17, 2011
View
2 app/controllers/rails_admin/main_controller.rb
@@ -42,7 +42,7 @@ def list
if params[:compact]
objects = []
@objects.each do |object|
- objects << { :id => object.id, :label => @model_config.list.with(:object => object).object_label }
+ objects << { :id => object.id, :label => @model_config.with(:object => object).object_label }
end
render :json => objects
else
View
2 app/views/rails_admin/main/_form_filtering_multiselect.html.erb
@@ -11,7 +11,7 @@
if xhr
collection = config.abstract_model.get_bulk(selected).map do |o|
- [config.list.with(:object => o).object_label, o.id]
+ [config.with(:object => o).object_label, o.id]
end
else
collection = field.associated_collection.sort_by{|object| object.first.to_s}

0 comments on commit 3b59394

Please sign in to comment.