Skip to content

Commit

Permalink
Fix calls to object_label in sections to point to model config
Browse files Browse the repository at this point in the history
  • Loading branch information
kaapa committed Mar 17, 2011
1 parent 6bf3482 commit 3b59394
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/rails_admin/main_controller.rb
Expand Up @@ -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
Expand Down
Expand Up @@ -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}
Expand Down

0 comments on commit 3b59394

Please sign in to comment.