{"action":"opened","issue":{"url":"https://api.github.com/repos/varvet/godmin/issues/156","labels_url":"https://api.github.com/repos/varvet/godmin/issues/156/labels{/name}","comments_url":"https://api.github.com/repos/varvet/godmin/issues/156/comments","events_url":"https://api.github.com/repos/varvet/godmin/issues/156/events","html_url":"https://github.com/varvet/godmin/issues/156","id":119104999,"number":156,"title":"Access url params at the service object level ?","user":{"login":"benjamin-thomas","id":1557738,"avatar_url":"https://avatars.githubusercontent.com/u/1557738?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamin-thomas","html_url":"https://github.com/benjamin-thomas","followers_url":"https://api.github.com/users/benjamin-thomas/followers","following_url":"https://api.github.com/users/benjamin-thomas/following{/other_user}","gists_url":"https://api.github.com/users/benjamin-thomas/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamin-thomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamin-thomas/subscriptions","organizations_url":"https://api.github.com/users/benjamin-thomas/orgs","repos_url":"https://api.github.com/users/benjamin-thomas/repos","events_url":"https://api.github.com/users/benjamin-thomas/events{/privacy}","received_events_url":"https://api.github.com/users/benjamin-thomas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-26T21:54:36Z","updated_at":"2015-11-26T21:54:36Z","closed_at":null,"body":"I'm not sure if this is a great idea, but I'm used to override a page's behavior by tweaking the url.\r\n\r\nFor instance let' say I have a `per_page` method defined in a service class:\r\n\r\n```ruby\r\ndef per_page\r\n  if scope == 'requires_action\r\n    10\r\n  else\r\n    super\r\n  end\r\nend\r\n``` \r\n\r\nI'd like to optionally override this behavior, via the url:\r\n\r\n```ruby\r\ndef per_page\r\n  return params[:per_page].to_i if params[:per_page]\r\n\r\n  if scope == 'requires_action\r\n    10\r\n  else\r\n    super\r\n  end\r\nend\r\n``` \r\n\r\nRight now this seems impossible, the params hash get's left behind at the service object initialization [right here](https://github.com/varvet/godmin/blob/6e9a22517af06d36596deb2051f987fd3ed77858/lib/godmin/resources/resource_controller.rb#L103).\r\n\r\nWould it be reasonable to optionally let through certain url params defined on the service class for instance:\r\n\r\n```ruby\r\nclass ArticleService\r\n  required_params :per_page, url_param1, url_param2\r\nend\r\n```\r\n\r\nAny thoughts?\r\n"}}