{"action":"created","comment":{"url":"https://api.github.com/repos/tablexi/nucore-open/pulls/comments/47575734","id":47575734,"diff_hunk":"@@ -1,9 +1,9 @@\n-= f.input :account_number, :label => t('facility_accounts.purchase_orders.account_number'), :required => true\n+- is_new ||= false\n \n-= f.input :formatted_expires_at, :required => true, :input_html => { :class => 'datepicker' }, :label => Account.human_attribute_name(:expires_at)\n+= f.input :account_number, label: t('facility_accounts.purchase_orders.account_number'), required: true\n+= f.input :description, required: true\n \n-= f.input :description, :required => true\n+= render partial: 'facility_accounts/account_fields/affiliate', locals: { f: f }\n+= render partial: 'facility_accounts/account_fields/remittance_information', locals: { f: f }\n \n-= render :partial => 'facility_accounts/account_fields/affiliate', :locals => { :f => f }\n-\n-= render :partial => 'facility_accounts/account_fields/remittance_information', :locals => { :f => f }\n+= f.input :formatted_expires_at, required: true, input_html: { class: 'datepicker' }, label: Account.human_attribute_name(:expires_at)","path":"vendor/engines/c2po/app/views/facility_accounts/account_fields/_purchase_order_account.html.haml","position":15,"original_position":15,"commit_id":"90ebcd77e45819c41a14f9b0a04b7352deae3618","original_commit_id":"be3c3fe0d60ae086d8c7767a61de46f80de39537","user":{"login":"jhanggi","id":1099111,"avatar_url":"https://avatars.githubusercontent.com/u/1099111?v=3","gravatar_id":"","url":"https://api.github.com/users/jhanggi","html_url":"https://github.com/jhanggi","followers_url":"https://api.github.com/users/jhanggi/followers","following_url":"https://api.github.com/users/jhanggi/following{/other_user}","gists_url":"https://api.github.com/users/jhanggi/gists{/gist_id}","starred_url":"https://api.github.com/users/jhanggi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhanggi/subscriptions","organizations_url":"https://api.github.com/users/jhanggi/orgs","repos_url":"https://api.github.com/users/jhanggi/repos","events_url":"https://api.github.com/users/jhanggi/events{/privacy}","received_events_url":"https://api.github.com/users/jhanggi/received_events","type":"User","site_admin":false},"body":"This ordering puts the expiration in inconsistent places. Think of the existing ordering this way (not all types will have all the fields):\r\n\r\n1. Definition (account number, PO #, Name on credit card--since we don't store a number)\r\n2. Expiration\r\n3. Description\r\n4. Affiliation\r\n5. Bill to","created_at":"2015-12-14T23:27:41Z","updated_at":"2015-12-14T23:27:41Z","html_url":"https://github.com/tablexi/nucore-open/pull/410#discussion_r47575734","pull_request_url":"https://api.github.com/repos/tablexi/nucore-open/pulls/410","_links":{"self":{"href":"https://api.github.com/repos/tablexi/nucore-open/pulls/comments/47575734"},"html":{"href":"https://github.com/tablexi/nucore-open/pull/410#discussion_r47575734"},"pull_request":{"href":"https://api.github.com/repos/tablexi/nucore-open/pulls/410"}}},"pull_request":{"url":"https://api.github.com/repos/tablexi/nucore-open/pulls/410","id":53076896,"html_url":"https://github.com/tablexi/nucore-open/pull/410","diff_url":"https://github.com/tablexi/nucore-open/pull/410.diff","patch_url":"https://github.com/tablexi/nucore-open/pull/410.patch","issue_url":"https://api.github.com/repos/tablexi/nucore-open/issues/410","number":410,"state":"open","locked":false,"title":"[#120455] Split accounts engine payment source","user":{"login":"benlinton","id":766787,"avatar_url":"https://avatars.githubusercontent.com/u/766787?v=3","gravatar_id":"","url":"https://api.github.com/users/benlinton","html_url":"https://github.com/benlinton","followers_url":"https://api.github.com/users/benlinton/followers","following_url":"https://api.github.com/users/benlinton/following{/other_user}","gists_url":"https://api.github.com/users/benlinton/gists{/gist_id}","starred_url":"https://api.github.com/users/benlinton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benlinton/subscriptions","organizations_url":"https://api.github.com/users/benlinton/orgs","repos_url":"https://api.github.com/users/benlinton/repos","events_url":"https://api.github.com/users/benlinton/events{/privacy}","received_events_url":"https://api.github.com/users/benlinton/received_events","type":"User","site_admin":false},"body":"Support creating, updating, and showing a `split_account` account type as a payment source.\r\n\r\nInstalled the `nested_form_fields` gem to easily add multiple `splits` on a new `split_account`.  \r\n\r\nThe `new` Account views now use a set of nav tabs rather than a select dropdown to choose account type. This means we no longer need to load an generic `Account` object for the `new` action, and can get rid of hacks to support using `Account.new` for the `new` form.  We can now load the specific subclassed account_type (i.e. `NufsAccount`) for new and create which seems like a cleaner approach.\r\n\r\nSince multiple engines are now adding account types, converted the `AccountManager:: GLOBAL_ACCOUNT_CLASSES`-like constants to class variables that are append-able by multiple engines.  Started the process of deprecating `app/support/account_manager.rb` in favor of putting account_type related methods in the `Account` class.  I feel the STI parent should track what it's children are.  Although, some of the non-account_type methods could probably get moved into a service object or etc. outside of the `app/support` directory.  I haven't done this yet.  \r\n\r\nMove `app/support/account_builder.rb` to services folder and refactored it.  Extended the `AccountBuilder` service object within engines that add new account types.  Began removing coupled code and tests from the main app that actually belong in engines.\r\n\r\nI also started refactoring additional legacy code, but removed it from this PR in order to keep the PR more focused/shorter.","created_at":"2015-12-09T04:59:19Z","updated_at":"2015-12-14T23:27:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"906c289b91f9d165c43c08d7182e66858375ec67","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tablexi/nucore-open/pulls/410/commits","review_comments_url":"https://api.github.com/repos/tablexi/nucore-open/pulls/410/comments","review_comment_url":"https://api.github.com/repos/tablexi/nucore-open/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tablexi/nucore-open/issues/410/comments","statuses_url":"https://api.github.com/repos/tablexi/nucore-open/statuses/90ebcd77e45819c41a14f9b0a04b7352deae3618","head":{"label":"tablexi:split-accounts-engine-payment-source","ref":"split-accounts-engine-payment-source","sha":"90ebcd77e45819c41a14f9b0a04b7352deae3618","user":{"login":"tablexi","id":229702,"avatar_url":"https://avatars.githubusercontent.com/u/229702?v=3","gravatar_id":"","url":"https://api.github.com/users/tablexi","html_url":"https://github.com/tablexi","followers_url":"https://api.github.com/users/tablexi/followers","following_url":"https://api.github.com/users/tablexi/following{/other_user}","gists_url":"https://api.github.com/users/tablexi/gists{/gist_id}","starred_url":"https://api.github.com/users/tablexi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tablexi/subscriptions","organizations_url":"https://api.github.com/users/tablexi/orgs","repos_url":"https://api.github.com/users/tablexi/repos","events_url":"https://api.github.com/users/tablexi/events{/privacy}","received_events_url":"https://api.github.com/users/tablexi/received_events","type":"Organization","site_admin":false},"repo":{"id":1439473,"name":"nucore-open","full_name":"tablexi/nucore-open","owner":{"login":"tablexi","id":229702,"avatar_url":"https://avatars.githubusercontent.com/u/229702?v=3","gravatar_id":"","url":"https://api.github.com/users/tablexi","html_url":"https://github.com/tablexi","followers_url":"https://api.github.com/users/tablexi/followers","following_url":"https://api.github.com/users/tablexi/following{/other_user}","gists_url":"https://api.github.com/users/tablexi/gists{/gist_id}","starred_url":"https://api.github.com/users/tablexi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tablexi/subscriptions","organizations_url":"https://api.github.com/users/tablexi/orgs","repos_url":"https://api.github.com/users/tablexi/repos","events_url":"https://api.github.com/users/tablexi/events{/privacy}","received_events_url":"https://api.github.com/users/tablexi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tablexi/nucore-open","description":"Northwestern University Core Facility Management Software (NUCore)","fork":false,"url":"https://api.github.com/repos/tablexi/nucore-open","forks_url":"https://api.github.com/repos/tablexi/nucore-open/forks","keys_url":"https://api.github.com/repos/tablexi/nucore-open/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tablexi/nucore-open/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tablexi/nucore-open/teams","hooks_url":"https://api.github.com/repos/tablexi/nucore-open/hooks","issue_events_url":"https://api.github.com/repos/tablexi/nucore-open/issues/events{/number}","events_url":"https://api.github.com/repos/tablexi/nucore-open/events","assignees_url":"https://api.github.com/repos/tablexi/nucore-open/assignees{/user}","branches_url":"https://api.github.com/repos/tablexi/nucore-open/branches{/branch}","tags_url":"https://api.github.com/repos/tablexi/nucore-open/tags","blobs_url":"https://api.github.com/repos/tablexi/nucore-open/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tablexi/nucore-open/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tablexi/nucore-open/git/refs{/sha}","trees_url":"https://api.github.com/repos/tablexi/nucore-open/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tablexi/nucore-open/statuses/{sha}","languages_url":"https://api.github.com/repos/tablexi/nucore-open/languages","stargazers_url":"https://api.github.com/repos/tablexi/nucore-open/stargazers","contributors_url":"https://api.github.com/repos/tablexi/nucore-open/contributors","subscribers_url":"https://api.github.com/repos/tablexi/nucore-open/subscribers","subscription_url":"https://api.github.com/repos/tablexi/nucore-open/subscription","commits_url":"https://api.github.com/repos/tablexi/nucore-open/commits{/sha}","git_commits_url":"https://api.github.com/repos/tablexi/nucore-open/git/commits{/sha}","comments_url":"https://api.github.com/repos/tablexi/nucore-open/comments{/number}","issue_comment_url":"https://api.github.com/repos/tablexi/nucore-open/issues/comments{/number}","contents_url":"https://api.github.com/repos/tablexi/nucore-open/contents/{+path}","compare_url":"https://api.github.com/repos/tablexi/nucore-open/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tablexi/nucore-open/merges","archive_url":"https://api.github.com/repos/tablexi/nucore-open/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tablexi/nucore-open/downloads","issues_url":"https://api.github.com/repos/tablexi/nucore-open/issues{/number}","pulls_url":"https://api.github.com/repos/tablexi/nucore-open/pulls{/number}","milestones_url":"https://api.github.com/repos/tablexi/nucore-open/milestones{/number}","notifications_url":"https://api.github.com/repos/tablexi/nucore-open/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tablexi/nucore-open/labels{/name}","releases_url":"https://api.github.com/repos/tablexi/nucore-open/releases{/id}","created_at":"2011-03-04T13:45:37Z","updated_at":"2015-05-07T22:55:09Z","pushed_at":"2015-12-11T23:57:04Z","git_url":"git://github.com/tablexi/nucore-open.git","ssh_url":"git@github.com:tablexi/nucore-open.git","clone_url":"https://github.com/tablexi/nucore-open.git","svn_url":"https://github.com/tablexi/nucore-open","homepage":"","size":60966,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":3,"default_branch":"master"}},"base":{"label":"tablexi:master","ref":"master","sha":"472963a9efb6a5de5e2fccde110de25ec76c8b1f","user":{"login":"tablexi","id":229702,"avatar_url":"https://avatars.githubusercontent.com/u/229702?v=3","gravatar_id":"","url":"https://api.github.com/users/tablexi","html_url":"https://github.com/tablexi","followers_url":"https://api.github.com/users/tablexi/followers","following_url":"https://api.github.com/users/tablexi/following{/other_user}","gists_url":"https://api.github.com/users/tablexi/gists{/gist_id}","starred_url":"https://api.github.com/users/tablexi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tablexi/subscriptions","organizations_url":"https://api.github.com/users/tablexi/orgs","repos_url":"https://api.github.com/users/tablexi/repos","events_url":"https://api.github.com/users/tablexi/events{/privacy}","received_events_url":"https://api.github.com/users/tablexi/received_events","type":"Organization","site_admin":false},"repo":{"id":1439473,"name":"nucore-open","full_name":"tablexi/nucore-open","owner":{"login":"tablexi","id":229702,"avatar_url":"https://avatars.githubusercontent.com/u/229702?v=3","gravatar_id":"","url":"https://api.github.com/users/tablexi","html_url":"https://github.com/tablexi","followers_url":"https://api.github.com/users/tablexi/followers","following_url":"https://api.github.com/users/tablexi/following{/other_user}","gists_url":"https://api.github.com/users/tablexi/gists{/gist_id}","starred_url":"https://api.github.com/users/tablexi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tablexi/subscriptions","organizations_url":"https://api.github.com/users/tablexi/orgs","repos_url":"https://api.github.com/users/tablexi/repos","events_url":"https://api.github.com/users/tablexi/events{/privacy}","received_events_url":"https://api.github.com/users/tablexi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tablexi/nucore-open","description":"Northwestern University Core Facility Management Software (NUCore)","fork":false,"url":"https://api.github.com/repos/tablexi/nucore-open","forks_url":"https://api.github.com/repos/tablexi/nucore-open/forks","keys_url":"https://api.github.com/repos/tablexi/nucore-open/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tablexi/nucore-open/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tablexi/nucore-open/teams","hooks_url":"https://api.github.com/repos/tablexi/nucore-open/hooks","issue_events_url":"https://api.github.com/repos/tablexi/nucore-open/issues/events{/number}","events_url":"https://api.github.com/repos/tablexi/nucore-open/events","assignees_url":"https://api.github.com/repos/tablexi/nucore-open/assignees{/user}","branches_url":"https://api.github.com/repos/tablexi/nucore-open/branches{/branch}","tags_url":"https://api.github.com/repos/tablexi/nucore-open/tags","blobs_url":"https://api.github.com/repos/tablexi/nucore-open/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tablexi/nucore-open/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tablexi/nucore-open/git/refs{/sha}","trees_url":"https://api.github.com/repos/tablexi/nucore-open/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tablexi/nucore-open/statuses/{sha}","languages_url":"https://api.github.com/repos/tablexi/nucore-open/languages","stargazers_url":"https://api.github.com/repos/tablexi/nucore-open/stargazers","contributors_url":"https://api.github.com/repos/tablexi/nucore-open/contributors","subscribers_url":"https://api.github.com/repos/tablexi/nucore-open/subscribers","subscription_url":"https://api.github.com/repos/tablexi/nucore-open/subscription","commits_url":"https://api.github.com/repos/tablexi/nucore-open/commits{/sha}","git_commits_url":"https://api.github.com/repos/tablexi/nucore-open/git/commits{/sha}","comments_url":"https://api.github.com/repos/tablexi/nucore-open/comments{/number}","issue_comment_url":"https://api.github.com/repos/tablexi/nucore-open/issues/comments{/number}","contents_url":"https://api.github.com/repos/tablexi/nucore-open/contents/{+path}","compare_url":"https://api.github.com/repos/tablexi/nucore-open/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tablexi/nucore-open/merges","archive_url":"https://api.github.com/repos/tablexi/nucore-open/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tablexi/nucore-open/downloads","issues_url":"https://api.github.com/repos/tablexi/nucore-open/issues{/number}","pulls_url":"https://api.github.com/repos/tablexi/nucore-open/pulls{/number}","milestones_url":"https://api.github.com/repos/tablexi/nucore-open/milestones{/number}","notifications_url":"https://api.github.com/repos/tablexi/nucore-open/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tablexi/nucore-open/labels{/name}","releases_url":"https://api.github.com/repos/tablexi/nucore-open/releases{/id}","created_at":"2011-03-04T13:45:37Z","updated_at":"2015-05-07T22:55:09Z","pushed_at":"2015-12-11T23:57:04Z","git_url":"git://github.com/tablexi/nucore-open.git","ssh_url":"git@github.com:tablexi/nucore-open.git","clone_url":"https://github.com/tablexi/nucore-open.git","svn_url":"https://github.com/tablexi/nucore-open","homepage":"","size":60966,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tablexi/nucore-open/pulls/410"},"html":{"href":"https://github.com/tablexi/nucore-open/pull/410"},"issue":{"href":"https://api.github.com/repos/tablexi/nucore-open/issues/410"},"comments":{"href":"https://api.github.com/repos/tablexi/nucore-open/issues/410/comments"},"review_comments":{"href":"https://api.github.com/repos/tablexi/nucore-open/pulls/410/comments"},"review_comment":{"href":"https://api.github.com/repos/tablexi/nucore-open/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tablexi/nucore-open/pulls/410/commits"},"statuses":{"href":"https://api.github.com/repos/tablexi/nucore-open/statuses/90ebcd77e45819c41a14f9b0a04b7352deae3618"}}}}