{"action":"created","issue":{"url":"https://api.github.com/repos/Katello/katello/issues/5663","labels_url":"https://api.github.com/repos/Katello/katello/issues/5663/labels{/name}","comments_url":"https://api.github.com/repos/Katello/katello/issues/5663/comments","events_url":"https://api.github.com/repos/Katello/katello/issues/5663/events","html_url":"https://github.com/Katello/katello/pull/5663","id":121526059,"number":5663,"title":"Fixes #10970 - Rails4 merge into master","user":{"login":"johnpmitsch","id":5964462,"avatar_url":"https://avatars.githubusercontent.com/u/5964462?v=3","gravatar_id":"","url":"https://api.github.com/users/johnpmitsch","html_url":"https://github.com/johnpmitsch","followers_url":"https://api.github.com/users/johnpmitsch/followers","following_url":"https://api.github.com/users/johnpmitsch/following{/other_user}","gists_url":"https://api.github.com/users/johnpmitsch/gists{/gist_id}","starred_url":"https://api.github.com/users/johnpmitsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnpmitsch/subscriptions","organizations_url":"https://api.github.com/users/johnpmitsch/orgs","repos_url":"https://api.github.com/users/johnpmitsch/repos","events_url":"https://api.github.com/users/johnpmitsch/events{/privacy}","received_events_url":"https://api.github.com/users/johnpmitsch/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Katello/katello/labels/Needs%20testing","name":"Needs testing","color":"fbca04"},{"url":"https://api.github.com/repos/Katello/katello/labels/Not%20yet%20reviewed","name":"Not yet reviewed","color":"009800"},{"url":"https://api.github.com/repos/Katello/katello/labels/Rails4","name":"Rails4","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-10T16:32:29Z","updated_at":"2015-12-10T18:54:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Katello/katello/pulls/5663","html_url":"https://github.com/Katello/katello/pull/5663","diff_url":"https://github.com/Katello/katello/pull/5663.diff","patch_url":"https://github.com/Katello/katello/pull/5663.patch"},"body":"These commits upgrade us to Rails 4.1.5. :tada:\r\n\r\nChanges include:\r\n\r\n * Updating necessary gems to rails 4 compatible versions\r\n * assert_include becomes assert_includes.\r\n * ```find_by_foo(\"bar\")``` becomes ```find_by(:foo => \"bar\")```\r\n * We will continue to use strong parameters, but have removed protected attributes and all instances of attr_accessible in our models. However, Foreman is using protected attributes currently in order to transition to strong parameters, so any extended foreman models should use  attr_accessible to whitelist attributes.\r\n * ```.scoped``` becomes ```.where(nil)```\r\n * ```:dependent => restrict``` becomes ```:dependent => :restrict_with_error``` \r\n * ```find_or_create_by_foo(\"bar\")``` becomes ```where(:foo => \"bar\").first_or_create```\r\n * Remove conditions, order, limit from has_many relations\r\n * Scope no longer uses ```:conditions =>```\r\n\r\nFeel free to comment if I left anything out."},"comment":{"url":"https://api.github.com/repos/Katello/katello/issues/comments/163716503","html_url":"https://github.com/Katello/katello/pull/5663#issuecomment-163716503","issue_url":"https://api.github.com/repos/Katello/katello/issues/5663","id":163716503,"user":{"login":"daviddavis","id":86290,"avatar_url":"https://avatars.githubusercontent.com/u/86290?v=3","gravatar_id":"","url":"https://api.github.com/users/daviddavis","html_url":"https://github.com/daviddavis","followers_url":"https://api.github.com/users/daviddavis/followers","following_url":"https://api.github.com/users/daviddavis/following{/other_user}","gists_url":"https://api.github.com/users/daviddavis/gists{/gist_id}","starred_url":"https://api.github.com/users/daviddavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daviddavis/subscriptions","organizations_url":"https://api.github.com/users/daviddavis/orgs","repos_url":"https://api.github.com/users/daviddavis/repos","events_url":"https://api.github.com/users/daviddavis/events{/privacy}","received_events_url":"https://api.github.com/users/daviddavis/received_events","type":"User","site_admin":false},"created_at":"2015-12-10T18:54:37Z","updated_at":"2015-12-10T18:54:37Z","body":"My personal preference would be to replace `where(nil)` with `all`. The former seems hacky to me."}}