Commit 0980148c by liyijie

move base.rb to lib

parent db5ca25d
require 'rails' require 'rails'
require 'actionpack' require 'active_record'
require 'activerecord'
require 'activesupport'
require 'active_support/dependencies'
require 'set'
require 'responders'
require 'ransack' require 'ransack'
require 'inherited_resources' require 'inherited_resources'
require 'responders'
module SimpleController module SimpleController
autoload :VERSION, 'simple_controller/version' autoload :VERSION, 'simple_controller/version'
......
...@@ -23,7 +23,7 @@ class SimpleController::Base < ::InheritedResources::Base ...@@ -23,7 +23,7 @@ class SimpleController::Base < ::InheritedResources::Base
@view_class_path @view_class_path
end end
def collection # def collection
get_collection_ivar || set_collection_ivar(end_of_association_chain.ransack(params[:q]).result.paginate(page: params[:page], per_page: params[:per_page])) # get_collection_ivar || set_collection_ivar(end_of_association_chain.ransack(params[:q]).result.paginate(page: params[:page], per_page: params[:per_page]))
end # end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment