[英]Active_admin NoMethodError
I am using active_admin to generate an admin page on my rails app. 我正在使用active_admin在我的Rails应用程序上生成一个管理页面。 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 Admin :: EmoticonsController#index中的NoMethodError
undefined method `per' for # #的未定义方法“ per”
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. 我不知道是否意外删除了active_admin文件之一。 But I recheck with the Railscast folder. 但是我重新检查了Railscast文件夹。 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. 谢谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.