Permalink
Browse files

Allow overriding @scaffold_objects in a before filter for the browse …

…view
  • Loading branch information...
jeremyevans committed Feb 9, 2012
1 parent a232f60 commit 2cbed89f1c6b9598ce697eb3e86240f03f739869
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/scaffolding_extensions/meta_controller.rb
@@ -180,7 +180,9 @@ def scaffold(klass, options = {})
if add_methods.include?(:browse)
scaffold_define_method("browse#{suffix}") do
@page ||= scaffold_request_param(:page).to_i > 1 ? scaffold_request_param(:page).to_i : 1
- @next_page, @scaffold_objects = klass.scaffold_browse_find_objects(:session=>scaffold_session, :page=>@page)
+ unless @scaffold_objects
+ @next_page, @scaffold_objects = klass.scaffold_browse_find_objects(:session=>scaffold_session, :page=>@page)
+ end
@scaffold_listtable_type = :browse
send(render_meth, :listtable)
end

0 comments on commit 2cbed89

Please sign in to comment.