{"action":"opened","issue":{"url":"https://api.github.com/repos/norman/friendly_id/issues/683","labels_url":"https://api.github.com/repos/norman/friendly_id/issues/683/labels{/name}","comments_url":"https://api.github.com/repos/norman/friendly_id/issues/683/comments","events_url":"https://api.github.com/repos/norman/friendly_id/issues/683/events","html_url":"https://github.com/norman/friendly_id/issues/683","id":94714551,"number":683,"title":"Add support for returning ActiveRecord::Relation instead of running the query immediately.","user":{"login":"ShimShtein","id":10046168,"avatar_url":"https://avatars.githubusercontent.com/u/10046168?v=3","gravatar_id":"","url":"https://api.github.com/users/ShimShtein","html_url":"https://github.com/ShimShtein","followers_url":"https://api.github.com/users/ShimShtein/followers","following_url":"https://api.github.com/users/ShimShtein/following{/other_user}","gists_url":"https://api.github.com/users/ShimShtein/gists{/gist_id}","starred_url":"https://api.github.com/users/ShimShtein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShimShtein/subscriptions","organizations_url":"https://api.github.com/users/ShimShtein/orgs","repos_url":"https://api.github.com/users/ShimShtein/repos","events_url":"https://api.github.com/users/ShimShtein/events{/privacy}","received_events_url":"https://api.github.com/users/ShimShtein/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-13T12:54:20Z","updated_at":"2015-07-13T12:54:20Z","closed_at":null,"body":"Consider code like this:\r\n``` Ruby\r\nquery = Posts.where(has_comments: true)\r\n\r\nif look_by_author\r\n  query = query.where(author: my_author)\r\nend\r\n\r\nquery = query.sort(:relevancy)\r\n```\r\nIt would be nice if I could use a friendly_id in the second `query` assignment, assuming I have marked the `author` field to use friendly_id.\r\n"}}