diff --git a/Gemfile.lock b/Gemfile.lock index 93f704de5d..2c8347d7ea 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,7 @@ PATH remote: . specs: refinerycms (0.9.9.6) - bundler (~> 1.0.10) + bundler (~> 1.0) refinerycms-authentication (~> 0.9.9.5) refinerycms-base (~> 0.9.9.5) refinerycms-core (~> 0.9.9.5) diff --git a/core/lib/refinery/crud.rb b/core/lib/refinery/crud.rb index 7f94bb6e9a..1a0515f42e 100644 --- a/core/lib/refinery/crud.rb +++ b/core/lib/refinery/crud.rb @@ -26,7 +26,8 @@ def self.default_options(model_name) :include => [], :paging => true, :search_conditions => '', - :redirect_to_url => "admin_#{plural_name}_url" + :redirect_to_url => "admin_#{plural_name}_url", + :per_page => false } end @@ -162,7 +163,7 @@ def paginate_all_#{plural_name} paging_options = {:page => params[:page]} # Use per_page from crudify options. - if #{options[:per_page]} + if #{options[:per_page].present?.inspect} paging_options.update({:per_page => #{options[:per_page].inspect}}) # Seems will_paginate doesn't always use the implicit method. elsif #{class_name}.methods.map(&:to_sym).include?(:per_page)