{"action":"opened","issue":{"url":"https://api.github.com/repos/activerecord-hackery/ransack/issues/518","labels_url":"https://api.github.com/repos/activerecord-hackery/ransack/issues/518/labels{/name}","comments_url":"https://api.github.com/repos/activerecord-hackery/ransack/issues/518/comments","events_url":"https://api.github.com/repos/activerecord-hackery/ransack/issues/518/events","html_url":"https://github.com/activerecord-hackery/ransack/issues/518","id":59932920,"number":518,"title":"undefined method `model_name' for Ransack::Search","user":{"login":"zenati","id":5849907,"avatar_url":"https://avatars.githubusercontent.com/u/5849907?v=3","gravatar_id":"","url":"https://api.github.com/users/zenati","html_url":"https://github.com/zenati","followers_url":"https://api.github.com/users/zenati/followers","following_url":"https://api.github.com/users/zenati/following{/other_user}","gists_url":"https://api.github.com/users/zenati/gists{/gist_id}","starred_url":"https://api.github.com/users/zenati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenati/subscriptions","organizations_url":"https://api.github.com/users/zenati/orgs","repos_url":"https://api.github.com/users/zenati/repos","events_url":"https://api.github.com/users/zenati/events{/privacy}","received_events_url":"https://api.github.com/users/zenati/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-05T10:29:27Z","updated_at":"2015-03-05T10:29:27Z","closed_at":null,"body":"Hello,\r\nI'm running Rails `4.2` and\r\n```ruby\r\ngem 'ransack', github: 'activerecord-hackery/ransack'\r\n```\r\nI have the following error:\r\n\r\n```ruby\r\nundefined method `model_name' for Ransack::Search\r\n```\r\nin here\r\n```haml\r\n= simple_form_for @q, method: :get do |form| # This line\r\n  = form.input :region_id_eq, collection: Region.ordered\r\n```\r\n\r\nHere is the action:\r\n```ruby\r\n  def index\r\n    @q = Wine.search(params[:q])\r\n    @wines = @q.result.page(params[:page])\r\n  end\r\n```\r\n\r\nAny idea? Thanks."}}