I am using active_admin to generate an admin page on my rails app. I have had it for like a week, but suddenly today when I click the link emoticon which is a resource for the admin, I get this error :
NoMethodError in Admin::EmoticonsController#index
undefined method `per' for #
here is my emoticon controller :
def index
@emoticons = Emoticon.search(params[:search]).order(sort_column + ' ' + sort_direction).paginate(:per_page => 10, :page => params[:page])
end
I don't know, if I accidentally deleted one of active_admin file. But I recheck with the Railscast folder. And I think everything is fine. Anyone has any idea where the error could come from?
Please let me know if you need any other files.
Thanks.
Have you seen this ? Assuming you are working with will_paginate
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.