{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/36dd57407828b5454b3b86f00e47fa79?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"36dd57407828b5454b3b86f00e47fa79","url":"https://api.github.com/users/jackquack","login":"jackquack","id":554881},"milestone":null,"assignee":null,"labels":[],"updated_at":"2011-11-03T15:27:27Z","comments":1,"closed_at":null,"url":"https://api.github.com/repos/sferik/rails_admin/issues/816","body":"I know this isn't actually an error with rails_admin, but with will_paginate (https://github.com/mislav/will_paginate/issues/174), but since I'm suffering from the bug while using rails_admin, it's a dependency of rails_admin, I wanted to post here as a marker for others suffering this issue to find.\r\n\r\nOn the will_paginate issue tracker, someone has posted a workaround initializer, but it isn't solving the entire problem for me. It just bugs out on another line, which complains of 'undefined method' 'total_count'\r\n\r\n    94:       - total_count = @objects.total_count\r\n\r\nI'll post again if I find a full solution.","html_url":"https://github.com/sferik/rails_admin/issues/816","title":"Name Error (undefined local variable or method 'per')","number":816,"id":2133511,"created_at":"2011-11-03T15:26:18Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/36dd57407828b5454b3b86f00e47fa79?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"36dd57407828b5454b3b86f00e47fa79","url":"https://api.github.com/users/jackquack","login":"jackquack","id":554881},"updated_at":"2011-11-03T15:27:27Z","url":"https://api.github.com/repos/sferik/rails_admin/issues/comments/2618405","body":"Wow, not a second later, I solved the second issue by adding a line to the original initalizer talked about on the will_paginate page. Here is mine which is solving all my problems for now.\r\n\r\nif defined?(WillPaginate)\r\n  module WillPaginate\r\n    module ActiveRecord\r\n      module RelationMethods\r\n        alias_method :per, :per_page\r\n        alias_method :num_pages, :total_pages\r\n        alias_method :total_count, :count\r\n      end\r\n    end\r\n  end\r\nend","id":2618405,"created_at":"2011-11-03T15:27:27Z"}}