{"action":"created","comment":{"url":"https://api.github.com/repos/activeadmin/activeadmin/pulls/comments/105564447","pull_request_review_id":26450997,"id":105564447,"diff_hunk":"@@ -0,0 +1,44 @@\n+module ActiveAdmin\n+\n+  class Resource\n+    module Attributes\n+\n+      def default_attributes\n+        resource_class.columns.each_with_object({}) do |c, attrs|\n+          unless reject_col?(c)","path":"lib/active_admin/resource/attributes.rb","position":8,"original_position":8,"commit_id":"1ef08af5044814c336917fa93aea607dce16dcb7","original_commit_id":"1ef08af5044814c336917fa93aea607dce16dcb7","user":{"login":"Fivell","id":120269,"avatar_url":"https://avatars1.githubusercontent.com/u/120269?v=3","gravatar_id":"","url":"https://api.github.com/users/Fivell","html_url":"https://github.com/Fivell","followers_url":"https://api.github.com/users/Fivell/followers","following_url":"https://api.github.com/users/Fivell/following{/other_user}","gists_url":"https://api.github.com/users/Fivell/gists{/gist_id}","starred_url":"https://api.github.com/users/Fivell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fivell/subscriptions","organizations_url":"https://api.github.com/users/Fivell/orgs","repos_url":"https://api.github.com/users/Fivell/repos","events_url":"https://api.github.com/users/Fivell/events{/privacy}","received_events_url":"https://api.github.com/users/Fivell/received_events","type":"User","site_admin":false},"body":"This is out of the scope of current PR I'm not going to change functionality please read original message","created_at":"2017-03-12T18:09:35Z","updated_at":"2017-03-12T18:09:35Z","html_url":"https://github.com/activeadmin/activeadmin/pull/4784#discussion_r105564447","pull_request_url":"https://api.github.com/repos/activeadmin/activeadmin/pulls/4784","_links":{"self":{"href":"https://api.github.com/repos/activeadmin/activeadmin/pulls/comments/105564447"},"html":{"href":"https://github.com/activeadmin/activeadmin/pull/4784#discussion_r105564447"},"pull_request":{"href":"https://api.github.com/repos/activeadmin/activeadmin/pulls/4784"}}},"pull_request":{"url":"https://api.github.com/repos/activeadmin/activeadmin/pulls/4784","id":105176108,"html_url":"https://github.com/activeadmin/activeadmin/pull/4784","diff_url":"https://github.com/activeadmin/activeadmin/pull/4784.diff","patch_url":"https://github.com/activeadmin/activeadmin/pull/4784.patch","issue_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/4784","number":4784,"state":"open","locked":false,"title":" resource attributes layer (refactoring)","user":{"login":"Fivell","id":120269,"avatar_url":"https://avatars1.githubusercontent.com/u/120269?v=3","gravatar_id":"","url":"https://api.github.com/users/Fivell","html_url":"https://github.com/Fivell","followers_url":"https://api.github.com/users/Fivell/followers","following_url":"https://api.github.com/users/Fivell/following{/other_user}","gists_url":"https://api.github.com/users/Fivell/gists{/gist_id}","starred_url":"https://api.github.com/users/Fivell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fivell/subscriptions","organizations_url":"https://api.github.com/users/Fivell/orgs","repos_url":"https://api.github.com/users/Fivell/repos","events_url":"https://api.github.com/users/Fivell/events{/privacy}","received_events_url":"https://api.github.com/users/Fivell/received_events","type":"User","site_admin":false},"body":"introducing correct handling foreign keys attributes on resource level.\r\n\r\nProblems:\r\n\r\nhttps://github.com/activeadmin/activeadmin/issues/4298#issuecomment-185467400 content_columns hardcoded in many places \r\n\r\n\r\nhttps://github.com/activeadmin/activeadmin/commit/f21cff30e7212706a39710e2c70ad0af8087ccea see Notes to commit message, example when renaming foreign key affects default show content\r\n\r\n\r\nhttps://github.com/activeadmin/activeadmin/issues/4298#issuecomment-185849747  ActiveAdmin can't figure out if column is foreign key or not\r\n\r\nhttps://github.com/activeadmin/activeadmin/commit/3efb359533df46e76bb4355a02ad31e727fb0da3#diff-b2d41db115eac24dba6f5e64bda8a690R53 introduced reflection parsing for each find_value method call because we still not know if this foreign key or not.\r\n\r\n\r\nIdea is to initialise attributes for each resource and skip heavy magic in runtime \r\n\r\n@timoschilling , @varyonic ,  @deivid-rodriguez  before continue working on this, I would like to have feedback\r\n\r\n \r\n\r\n\r\n","created_at":"2017-02-08T09:18:37Z","updated_at":"2017-03-12T18:09:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"016f36fdb142956db92a72148df3f6bcfa721339","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/activeadmin/activeadmin/pulls/4784/commits","review_comments_url":"https://api.github.com/repos/activeadmin/activeadmin/pulls/4784/comments","review_comment_url":"https://api.github.com/repos/activeadmin/activeadmin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/4784/comments","statuses_url":"https://api.github.com/repos/activeadmin/activeadmin/statuses/1ef08af5044814c336917fa93aea607dce16dcb7","head":{"label":"Fivell:default-resource-attributes","ref":"default-resource-attributes","sha":"1ef08af5044814c336917fa93aea607dce16dcb7","user":{"login":"Fivell","id":120269,"avatar_url":"https://avatars1.githubusercontent.com/u/120269?v=3","gravatar_id":"","url":"https://api.github.com/users/Fivell","html_url":"https://github.com/Fivell","followers_url":"https://api.github.com/users/Fivell/followers","following_url":"https://api.github.com/users/Fivell/following{/other_user}","gists_url":"https://api.github.com/users/Fivell/gists{/gist_id}","starred_url":"https://api.github.com/users/Fivell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fivell/subscriptions","organizations_url":"https://api.github.com/users/Fivell/orgs","repos_url":"https://api.github.com/users/Fivell/repos","events_url":"https://api.github.com/users/Fivell/events{/privacy}","received_events_url":"https://api.github.com/users/Fivell/received_events","type":"User","site_admin":false},"repo":{"id":77458409,"name":"activeadmin","full_name":"Fivell/activeadmin","owner":{"login":"Fivell","id":120269,"avatar_url":"https://avatars1.githubusercontent.com/u/120269?v=3","gravatar_id":"","url":"https://api.github.com/users/Fivell","html_url":"https://github.com/Fivell","followers_url":"https://api.github.com/users/Fivell/followers","following_url":"https://api.github.com/users/Fivell/following{/other_user}","gists_url":"https://api.github.com/users/Fivell/gists{/gist_id}","starred_url":"https://api.github.com/users/Fivell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fivell/subscriptions","organizations_url":"https://api.github.com/users/Fivell/orgs","repos_url":"https://api.github.com/users/Fivell/repos","events_url":"https://api.github.com/users/Fivell/events{/privacy}","received_events_url":"https://api.github.com/users/Fivell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Fivell/activeadmin","description":"The administration framework for Ruby on Rails applications.","fork":true,"url":"https://api.github.com/repos/Fivell/activeadmin","forks_url":"https://api.github.com/repos/Fivell/activeadmin/forks","keys_url":"https://api.github.com/repos/Fivell/activeadmin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Fivell/activeadmin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Fivell/activeadmin/teams","hooks_url":"https://api.github.com/repos/Fivell/activeadmin/hooks","issue_events_url":"https://api.github.com/repos/Fivell/activeadmin/issues/events{/number}","events_url":"https://api.github.com/repos/Fivell/activeadmin/events","assignees_url":"https://api.github.com/repos/Fivell/activeadmin/assignees{/user}","branches_url":"https://api.github.com/repos/Fivell/activeadmin/branches{/branch}","tags_url":"https://api.github.com/repos/Fivell/activeadmin/tags","blobs_url":"https://api.github.com/repos/Fivell/activeadmin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Fivell/activeadmin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Fivell/activeadmin/git/refs{/sha}","trees_url":"https://api.github.com/repos/Fivell/activeadmin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Fivell/activeadmin/statuses/{sha}","languages_url":"https://api.github.com/repos/Fivell/activeadmin/languages","stargazers_url":"https://api.github.com/repos/Fivell/activeadmin/stargazers","contributors_url":"https://api.github.com/repos/Fivell/activeadmin/contributors","subscribers_url":"https://api.github.com/repos/Fivell/activeadmin/subscribers","subscription_url":"https://api.github.com/repos/Fivell/activeadmin/subscription","commits_url":"https://api.github.com/repos/Fivell/activeadmin/commits{/sha}","git_commits_url":"https://api.github.com/repos/Fivell/activeadmin/git/commits{/sha}","comments_url":"https://api.github.com/repos/Fivell/activeadmin/comments{/number}","issue_comment_url":"https://api.github.com/repos/Fivell/activeadmin/issues/comments{/number}","contents_url":"https://api.github.com/repos/Fivell/activeadmin/contents/{+path}","compare_url":"https://api.github.com/repos/Fivell/activeadmin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Fivell/activeadmin/merges","archive_url":"https://api.github.com/repos/Fivell/activeadmin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Fivell/activeadmin/downloads","issues_url":"https://api.github.com/repos/Fivell/activeadmin/issues{/number}","pulls_url":"https://api.github.com/repos/Fivell/activeadmin/pulls{/number}","milestones_url":"https://api.github.com/repos/Fivell/activeadmin/milestones{/number}","notifications_url":"https://api.github.com/repos/Fivell/activeadmin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Fivell/activeadmin/labels{/name}","releases_url":"https://api.github.com/repos/Fivell/activeadmin/releases{/id}","deployments_url":"https://api.github.com/repos/Fivell/activeadmin/deployments","created_at":"2016-12-27T13:42:15Z","updated_at":"2016-12-27T13:42:19Z","pushed_at":"2017-03-11T15:10:48Z","git_url":"git://github.com/Fivell/activeadmin.git","ssh_url":"git@github.com:Fivell/activeadmin.git","clone_url":"https://github.com/Fivell/activeadmin.git","svn_url":"https://github.com/Fivell/activeadmin","homepage":"activeadmin.info","size":6760,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"activeadmin:master","ref":"master","sha":"6f721888dadeec5271f9b1000ee6316598df10f3","user":{"login":"activeadmin","id":814570,"avatar_url":"https://avatars2.githubusercontent.com/u/814570?v=3","gravatar_id":"","url":"https://api.github.com/users/activeadmin","html_url":"https://github.com/activeadmin","followers_url":"https://api.github.com/users/activeadmin/followers","following_url":"https://api.github.com/users/activeadmin/following{/other_user}","gists_url":"https://api.github.com/users/activeadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/activeadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/activeadmin/subscriptions","organizations_url":"https://api.github.com/users/activeadmin/orgs","repos_url":"https://api.github.com/users/activeadmin/repos","events_url":"https://api.github.com/users/activeadmin/events{/privacy}","received_events_url":"https://api.github.com/users/activeadmin/received_events","type":"Organization","site_admin":false},"repo":{"id":611921,"name":"activeadmin","full_name":"activeadmin/activeadmin","owner":{"login":"activeadmin","id":814570,"avatar_url":"https://avatars2.githubusercontent.com/u/814570?v=3","gravatar_id":"","url":"https://api.github.com/users/activeadmin","html_url":"https://github.com/activeadmin","followers_url":"https://api.github.com/users/activeadmin/followers","following_url":"https://api.github.com/users/activeadmin/following{/other_user}","gists_url":"https://api.github.com/users/activeadmin/gists{/gist_id}","starred_url":"https://api.github.com/users/activeadmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/activeadmin/subscriptions","organizations_url":"https://api.github.com/users/activeadmin/orgs","repos_url":"https://api.github.com/users/activeadmin/repos","events_url":"https://api.github.com/users/activeadmin/events{/privacy}","received_events_url":"https://api.github.com/users/activeadmin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/activeadmin/activeadmin","description":"The administration framework for Ruby on Rails applications.","fork":false,"url":"https://api.github.com/repos/activeadmin/activeadmin","forks_url":"https://api.github.com/repos/activeadmin/activeadmin/forks","keys_url":"https://api.github.com/repos/activeadmin/activeadmin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/activeadmin/activeadmin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/activeadmin/activeadmin/teams","hooks_url":"https://api.github.com/repos/activeadmin/activeadmin/hooks","issue_events_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/events{/number}","events_url":"https://api.github.com/repos/activeadmin/activeadmin/events","assignees_url":"https://api.github.com/repos/activeadmin/activeadmin/assignees{/user}","branches_url":"https://api.github.com/repos/activeadmin/activeadmin/branches{/branch}","tags_url":"https://api.github.com/repos/activeadmin/activeadmin/tags","blobs_url":"https://api.github.com/repos/activeadmin/activeadmin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/activeadmin/activeadmin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/activeadmin/activeadmin/git/refs{/sha}","trees_url":"https://api.github.com/repos/activeadmin/activeadmin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/activeadmin/activeadmin/statuses/{sha}","languages_url":"https://api.github.com/repos/activeadmin/activeadmin/languages","stargazers_url":"https://api.github.com/repos/activeadmin/activeadmin/stargazers","contributors_url":"https://api.github.com/repos/activeadmin/activeadmin/contributors","subscribers_url":"https://api.github.com/repos/activeadmin/activeadmin/subscribers","subscription_url":"https://api.github.com/repos/activeadmin/activeadmin/subscription","commits_url":"https://api.github.com/repos/activeadmin/activeadmin/commits{/sha}","git_commits_url":"https://api.github.com/repos/activeadmin/activeadmin/git/commits{/sha}","comments_url":"https://api.github.com/repos/activeadmin/activeadmin/comments{/number}","issue_comment_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/comments{/number}","contents_url":"https://api.github.com/repos/activeadmin/activeadmin/contents/{+path}","compare_url":"https://api.github.com/repos/activeadmin/activeadmin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/activeadmin/activeadmin/merges","archive_url":"https://api.github.com/repos/activeadmin/activeadmin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/activeadmin/activeadmin/downloads","issues_url":"https://api.github.com/repos/activeadmin/activeadmin/issues{/number}","pulls_url":"https://api.github.com/repos/activeadmin/activeadmin/pulls{/number}","milestones_url":"https://api.github.com/repos/activeadmin/activeadmin/milestones{/number}","notifications_url":"https://api.github.com/repos/activeadmin/activeadmin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/activeadmin/activeadmin/labels{/name}","releases_url":"https://api.github.com/repos/activeadmin/activeadmin/releases{/id}","deployments_url":"https://api.github.com/repos/activeadmin/activeadmin/deployments","created_at":"2010-04-15T14:26:03Z","updated_at":"2017-03-12T17:33:01Z","pushed_at":"2017-03-11T15:10:46Z","git_url":"git://github.com/activeadmin/activeadmin.git","ssh_url":"git@github.com:activeadmin/activeadmin.git","clone_url":"https://github.com/activeadmin/activeadmin.git","svn_url":"https://github.com/activeadmin/activeadmin","homepage":"https://activeadmin.info","size":6750,"stargazers_count":7172,"watchers_count":7172,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":2622,"mirror_url":null,"open_issues_count":208,"forks":2622,"open_issues":208,"watchers":7172,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/activeadmin/activeadmin/pulls/4784"},"html":{"href":"https://github.com/activeadmin/activeadmin/pull/4784"},"issue":{"href":"https://api.github.com/repos/activeadmin/activeadmin/issues/4784"},"comments":{"href":"https://api.github.com/repos/activeadmin/activeadmin/issues/4784/comments"},"review_comments":{"href":"https://api.github.com/repos/activeadmin/activeadmin/pulls/4784/comments"},"review_comment":{"href":"https://api.github.com/repos/activeadmin/activeadmin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/activeadmin/activeadmin/pulls/4784/commits"},"statuses":{"href":"https://api.github.com/repos/activeadmin/activeadmin/statuses/1ef08af5044814c336917fa93aea607dce16dcb7"}}}}
{"actor":{"display_login":"Fivell"}}