{"action":"created","comment":{"url":"https://api.github.com/repos/andrewquan/myflix/pulls/comments/52005793","id":52005793,"diff_hunk":"@@ -1,20 +1,35 @@\n+= content_for :head do \n+  %script{:src => \"https://js.stripe.com/v2/\", :type => \"text/javascript\"}\n+  :javascript\n+    Stripe.setPublishableKey(\"#{ENV['STRIPE_PUBLISHABLE_KEY']}\");\n+  = javascript_include_tag 'payments'\n+\n %section.register.container\n   .row\n     .col-sm-10.col-sm-offset-1\n-      = bootstrap_form_for @user, layout: :horizontal, label_col: \"col-sm-2\", control_col: \"col-sm-6\" do |f|\n+      = bootstrap_form_for @user, layout: :horizontal, label_col: \"col-sm-2\", control_col: \"col-sm-6\", html: {id: 'payment-form'} do |f|\n         %header\n           %h1 Register\n         %fieldset\n+          = f.text_field :email, label: \"Email Address\"\n+          = f.password_field :password, label: \"Password\"\n+          = f.text_field :full_name, label: \"Full Name\"\n+          = hidden_field_tag :invitation_token, @invitation_token\n+        %fieldset.credit_card\n           .form-group\n-            .row\n-              = f.text_field :email, label: \"Email Address\", class: \"form-control\"\n+            %label.control-label.col-sm-2 Credit Card Number\n+            .col-sm-6\n+              %input.form-control(type=\"text\" data-stripe='number')\n           .form-group\n-            .row\n-              = f.password_field :password, label: \"Password\", class: \"form-control\"\n+            %label.control-label.col-sm-2 Security Code\n+            .col-sm-6\n+              %input.form-control(type=\"text\" data-stripe='cvc')\n           .form-group\n-            .row\n-              = f.text_field :full_name, label: \"Full Name\", class: \"form-control\"\n-          = hidden_field_tag :invitation_token, @invitation_token\n+            %label.control-label.col-sm-2 Expiration\n+            .col-sm-3\n+              = select_month(Date.today, {add_month_numbers: true},  class: 'form-control', name: nil, data: {stripe: \"exp-month\"})\n+            .col-sm-2\n+              = select_year(Date.today.year, {start_year: Date.today.year, end_year: Date.today.year + 4}, class: 'form-control', name: nil, data: {stripe: \"exp-year\"})\n         %fieldset.actions.control-group.col-sm-offset-2\n           .controls\n-            = f.submit \"Sign Up\", class: \"btn btn-default\"\n\\ No newline at end of file\n+            %input(type=\"submit\" value=\"Sign Up\" class=\"btn btn-default\")","path":"app/views/users/new.html.haml","position":45,"original_position":45,"commit_id":"f00c94bc0af8f310cb9fd20b24132a3f07c78ce4","original_commit_id":"f00c94bc0af8f310cb9fd20b24132a3f07c78ce4","user":{"login":"tomtomecek","id":7385469,"avatar_url":"https://avatars.githubusercontent.com/u/7385469?v=3","gravatar_id":"","url":"https://api.github.com/users/tomtomecek","html_url":"https://github.com/tomtomecek","followers_url":"https://api.github.com/users/tomtomecek/followers","following_url":"https://api.github.com/users/tomtomecek/following{/other_user}","gists_url":"https://api.github.com/users/tomtomecek/gists{/gist_id}","starred_url":"https://api.github.com/users/tomtomecek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomtomecek/subscriptions","organizations_url":"https://api.github.com/users/tomtomecek/orgs","repos_url":"https://api.github.com/users/tomtomecek/repos","events_url":"https://api.github.com/users/tomtomecek/events{/privacy}","received_events_url":"https://api.github.com/users/tomtomecek/received_events","type":"User","site_admin":false},"body":"The previous Rails helper here was fine.","created_at":"2016-02-05T11:35:42Z","updated_at":"2016-02-05T11:35:42Z","html_url":"https://github.com/andrewquan/myflix/pull/10#discussion_r52005793","pull_request_url":"https://api.github.com/repos/andrewquan/myflix/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/andrewquan/myflix/pulls/comments/52005793"},"html":{"href":"https://github.com/andrewquan/myflix/pull/10#discussion_r52005793"},"pull_request":{"href":"https://api.github.com/repos/andrewquan/myflix/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/andrewquan/myflix/pulls/10","id":58384178,"html_url":"https://github.com/andrewquan/myflix/pull/10","diff_url":"https://github.com/andrewquan/myflix/pull/10.diff","patch_url":"https://github.com/andrewquan/myflix/pull/10.patch","issue_url":"https://api.github.com/repos/andrewquan/myflix/issues/10","number":10,"state":"open","locked":false,"title":"Second half of Week 6 PR","user":{"login":"andrewquan","id":7402106,"avatar_url":"https://avatars.githubusercontent.com/u/7402106?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewquan","html_url":"https://github.com/andrewquan","followers_url":"https://api.github.com/users/andrewquan/followers","following_url":"https://api.github.com/users/andrewquan/following{/other_user}","gists_url":"https://api.github.com/users/andrewquan/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewquan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewquan/subscriptions","organizations_url":"https://api.github.com/users/andrewquan/orgs","repos_url":"https://api.github.com/users/andrewquan/repos","events_url":"https://api.github.com/users/andrewquan/events{/privacy}","received_events_url":"https://api.github.com/users/andrewquan/received_events","type":"User","site_admin":false},"body":"Rspec is throwing a lot of errors. I think they're related to Stripe.","created_at":"2016-02-05T03:26:17Z","updated_at":"2016-02-05T11:35:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/andrewquan/myflix/pulls/10/commits","review_comments_url":"https://api.github.com/repos/andrewquan/myflix/pulls/10/comments","review_comment_url":"https://api.github.com/repos/andrewquan/myflix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andrewquan/myflix/issues/10/comments","statuses_url":"https://api.github.com/repos/andrewquan/myflix/statuses/f00c94bc0af8f310cb9fd20b24132a3f07c78ce4","head":{"label":"andrewquan:week6","ref":"week6","sha":"f00c94bc0af8f310cb9fd20b24132a3f07c78ce4","user":{"login":"andrewquan","id":7402106,"avatar_url":"https://avatars.githubusercontent.com/u/7402106?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewquan","html_url":"https://github.com/andrewquan","followers_url":"https://api.github.com/users/andrewquan/followers","following_url":"https://api.github.com/users/andrewquan/following{/other_user}","gists_url":"https://api.github.com/users/andrewquan/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewquan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewquan/subscriptions","organizations_url":"https://api.github.com/users/andrewquan/orgs","repos_url":"https://api.github.com/users/andrewquan/repos","events_url":"https://api.github.com/users/andrewquan/events{/privacy}","received_events_url":"https://api.github.com/users/andrewquan/received_events","type":"User","site_admin":false},"repo":{"id":48138080,"name":"myflix","full_name":"andrewquan/myflix","owner":{"login":"andrewquan","id":7402106,"avatar_url":"https://avatars.githubusercontent.com/u/7402106?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewquan","html_url":"https://github.com/andrewquan","followers_url":"https://api.github.com/users/andrewquan/followers","following_url":"https://api.github.com/users/andrewquan/following{/other_user}","gists_url":"https://api.github.com/users/andrewquan/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewquan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewquan/subscriptions","organizations_url":"https://api.github.com/users/andrewquan/orgs","repos_url":"https://api.github.com/users/andrewquan/repos","events_url":"https://api.github.com/users/andrewquan/events{/privacy}","received_events_url":"https://api.github.com/users/andrewquan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andrewquan/myflix","description":"","fork":false,"url":"https://api.github.com/repos/andrewquan/myflix","forks_url":"https://api.github.com/repos/andrewquan/myflix/forks","keys_url":"https://api.github.com/repos/andrewquan/myflix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrewquan/myflix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrewquan/myflix/teams","hooks_url":"https://api.github.com/repos/andrewquan/myflix/hooks","issue_events_url":"https://api.github.com/repos/andrewquan/myflix/issues/events{/number}","events_url":"https://api.github.com/repos/andrewquan/myflix/events","assignees_url":"https://api.github.com/repos/andrewquan/myflix/assignees{/user}","branches_url":"https://api.github.com/repos/andrewquan/myflix/branches{/branch}","tags_url":"https://api.github.com/repos/andrewquan/myflix/tags","blobs_url":"https://api.github.com/repos/andrewquan/myflix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrewquan/myflix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrewquan/myflix/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrewquan/myflix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrewquan/myflix/statuses/{sha}","languages_url":"https://api.github.com/repos/andrewquan/myflix/languages","stargazers_url":"https://api.github.com/repos/andrewquan/myflix/stargazers","contributors_url":"https://api.github.com/repos/andrewquan/myflix/contributors","subscribers_url":"https://api.github.com/repos/andrewquan/myflix/subscribers","subscription_url":"https://api.github.com/repos/andrewquan/myflix/subscription","commits_url":"https://api.github.com/repos/andrewquan/myflix/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrewquan/myflix/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrewquan/myflix/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrewquan/myflix/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrewquan/myflix/contents/{+path}","compare_url":"https://api.github.com/repos/andrewquan/myflix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrewquan/myflix/merges","archive_url":"https://api.github.com/repos/andrewquan/myflix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrewquan/myflix/downloads","issues_url":"https://api.github.com/repos/andrewquan/myflix/issues{/number}","pulls_url":"https://api.github.com/repos/andrewquan/myflix/pulls{/number}","milestones_url":"https://api.github.com/repos/andrewquan/myflix/milestones{/number}","notifications_url":"https://api.github.com/repos/andrewquan/myflix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrewquan/myflix/labels{/name}","releases_url":"https://api.github.com/repos/andrewquan/myflix/releases{/id}","deployments_url":"https://api.github.com/repos/andrewquan/myflix/deployments","created_at":"2015-12-16T22:11:39Z","updated_at":"2016-01-13T22:30:57Z","pushed_at":"2016-02-05T03:26:18Z","git_url":"git://github.com/andrewquan/myflix.git","ssh_url":"git@github.com:andrewquan/myflix.git","clone_url":"https://github.com/andrewquan/myflix.git","svn_url":"https://github.com/andrewquan/myflix","homepage":null,"size":1123,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"andrewquan:staging","ref":"staging","sha":"894d0d3b6c25fab3a45e37f5ccfa9981d162319f","user":{"login":"andrewquan","id":7402106,"avatar_url":"https://avatars.githubusercontent.com/u/7402106?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewquan","html_url":"https://github.com/andrewquan","followers_url":"https://api.github.com/users/andrewquan/followers","following_url":"https://api.github.com/users/andrewquan/following{/other_user}","gists_url":"https://api.github.com/users/andrewquan/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewquan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewquan/subscriptions","organizations_url":"https://api.github.com/users/andrewquan/orgs","repos_url":"https://api.github.com/users/andrewquan/repos","events_url":"https://api.github.com/users/andrewquan/events{/privacy}","received_events_url":"https://api.github.com/users/andrewquan/received_events","type":"User","site_admin":false},"repo":{"id":48138080,"name":"myflix","full_name":"andrewquan/myflix","owner":{"login":"andrewquan","id":7402106,"avatar_url":"https://avatars.githubusercontent.com/u/7402106?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewquan","html_url":"https://github.com/andrewquan","followers_url":"https://api.github.com/users/andrewquan/followers","following_url":"https://api.github.com/users/andrewquan/following{/other_user}","gists_url":"https://api.github.com/users/andrewquan/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewquan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewquan/subscriptions","organizations_url":"https://api.github.com/users/andrewquan/orgs","repos_url":"https://api.github.com/users/andrewquan/repos","events_url":"https://api.github.com/users/andrewquan/events{/privacy}","received_events_url":"https://api.github.com/users/andrewquan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andrewquan/myflix","description":"","fork":false,"url":"https://api.github.com/repos/andrewquan/myflix","forks_url":"https://api.github.com/repos/andrewquan/myflix/forks","keys_url":"https://api.github.com/repos/andrewquan/myflix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrewquan/myflix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrewquan/myflix/teams","hooks_url":"https://api.github.com/repos/andrewquan/myflix/hooks","issue_events_url":"https://api.github.com/repos/andrewquan/myflix/issues/events{/number}","events_url":"https://api.github.com/repos/andrewquan/myflix/events","assignees_url":"https://api.github.com/repos/andrewquan/myflix/assignees{/user}","branches_url":"https://api.github.com/repos/andrewquan/myflix/branches{/branch}","tags_url":"https://api.github.com/repos/andrewquan/myflix/tags","blobs_url":"https://api.github.com/repos/andrewquan/myflix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrewquan/myflix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrewquan/myflix/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrewquan/myflix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrewquan/myflix/statuses/{sha}","languages_url":"https://api.github.com/repos/andrewquan/myflix/languages","stargazers_url":"https://api.github.com/repos/andrewquan/myflix/stargazers","contributors_url":"https://api.github.com/repos/andrewquan/myflix/contributors","subscribers_url":"https://api.github.com/repos/andrewquan/myflix/subscribers","subscription_url":"https://api.github.com/repos/andrewquan/myflix/subscription","commits_url":"https://api.github.com/repos/andrewquan/myflix/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrewquan/myflix/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrewquan/myflix/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrewquan/myflix/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrewquan/myflix/contents/{+path}","compare_url":"https://api.github.com/repos/andrewquan/myflix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrewquan/myflix/merges","archive_url":"https://api.github.com/repos/andrewquan/myflix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrewquan/myflix/downloads","issues_url":"https://api.github.com/repos/andrewquan/myflix/issues{/number}","pulls_url":"https://api.github.com/repos/andrewquan/myflix/pulls{/number}","milestones_url":"https://api.github.com/repos/andrewquan/myflix/milestones{/number}","notifications_url":"https://api.github.com/repos/andrewquan/myflix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrewquan/myflix/labels{/name}","releases_url":"https://api.github.com/repos/andrewquan/myflix/releases{/id}","deployments_url":"https://api.github.com/repos/andrewquan/myflix/deployments","created_at":"2015-12-16T22:11:39Z","updated_at":"2016-01-13T22:30:57Z","pushed_at":"2016-02-05T03:26:18Z","git_url":"git://github.com/andrewquan/myflix.git","ssh_url":"git@github.com:andrewquan/myflix.git","clone_url":"https://github.com/andrewquan/myflix.git","svn_url":"https://github.com/andrewquan/myflix","homepage":null,"size":1123,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andrewquan/myflix/pulls/10"},"html":{"href":"https://github.com/andrewquan/myflix/pull/10"},"issue":{"href":"https://api.github.com/repos/andrewquan/myflix/issues/10"},"comments":{"href":"https://api.github.com/repos/andrewquan/myflix/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/andrewquan/myflix/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/andrewquan/myflix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andrewquan/myflix/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/andrewquan/myflix/statuses/f00c94bc0af8f310cb9fd20b24132a3f07c78ce4"}}}}