{"action":"created","comment":{"url":"https://api.github.com/repos/ajsharma/monologue/pulls/comments/31006232","id":31006232,"diff_hunk":"@@ -1,44 +1,79 @@\n # Use this setup block to configure all options available in SimpleForm.\n+# http://stackoverflow.com/questions/14972253/simpleform-default-input-class\n+# https://github.com/plataformatec/simple_form/issues/316\n+\n+inputs = %w[\n+  CollectionSelectInput\n+  DateTimeInput\n+  FileInput\n+  GroupedCollectionSelectInput\n+  NumericInput\n+  PasswordInput\n+  RangeInput\n+  StringInput\n+  TextInput\n+]\n+\n+inputs.each do |input_type|\n+  superclass = \"SimpleForm::Inputs::#{input_type}\".constantize\n+\n+  new_class = Class.new(superclass) do\n+    def input_html_classes\n+      super.push(\"form-control\")\n+    end\n+  end\n+\n+  Object.const_set(input_type, new_class)\n+end\n+\n+# Use this setup block to configure all options available in SimpleForm.\n SimpleForm.setup do |config|\n-  config.wrappers :bootstrap, tag: 'div', class: 'control-group', error_class: 'error' do |b|\n+  config.boolean_style = :nested\n+\n+  config.wrappers :bootstrap, tag: \"div\", class: \"form-group\", error_class: \"has-error\",\n+      defaults: { input_html: { class: \"default_class\" } } do |b|\n+\n     b.use :html5\n+    b.use :min_max\n+    b.use :maxlength\n     b.use :placeholder\n-    b.use :label\n-    b.wrapper tag: 'div', class: 'controls' do |ba|\n-      ba.use :input\n-      ba.use :error, wrap_with: { tag: 'span', class: 'help-inline' }\n-      ba.use :hint,  wrap_with: { tag: 'p', class: 'help-block' }\n-    end\n+\n+    b.optional :pattern\n+    b.optional :readonly\n+\n+    b.use :label_input\n+    b.use :hint,  wrap_with: { tag: \"span\", class: \"help-block\" }","path":"config/initializers/simple_form_bootstrap.rb","position":52,"original_position":52,"commit_id":"ee5eb3011a41b9bae245c99e734605d8c2729f06","original_commit_id":"ee5eb3011a41b9bae245c99e734605d8c2729f06","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Unnecessary spacing detected.","created_at":"2015-05-26T06:01:00Z","updated_at":"2015-05-26T06:01:00Z","html_url":"https://github.com/ajsharma/monologue/pull/38#discussion_r31006232","pull_request_url":"https://api.github.com/repos/ajsharma/monologue/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/ajsharma/monologue/pulls/comments/31006232"},"html":{"href":"https://github.com/ajsharma/monologue/pull/38#discussion_r31006232"},"pull_request":{"href":"https://api.github.com/repos/ajsharma/monologue/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/ajsharma/monologue/pulls/38","id":36171685,"html_url":"https://github.com/ajsharma/monologue/pull/38","diff_url":"https://github.com/ajsharma/monologue/pull/38.diff","patch_url":"https://github.com/ajsharma/monologue/pull/38.patch","issue_url":"https://api.github.com/repos/ajsharma/monologue/issues/38","number":38,"state":"open","locked":false,"title":"Updates syntax for bootstrap 3","user":{"login":"ajsharma","id":766658,"avatar_url":"https://avatars.githubusercontent.com/u/766658?v=3","gravatar_id":"","url":"https://api.github.com/users/ajsharma","html_url":"https://github.com/ajsharma","followers_url":"https://api.github.com/users/ajsharma/followers","following_url":"https://api.github.com/users/ajsharma/following{/other_user}","gists_url":"https://api.github.com/users/ajsharma/gists{/gist_id}","starred_url":"https://api.github.com/users/ajsharma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajsharma/subscriptions","organizations_url":"https://api.github.com/users/ajsharma/orgs","repos_url":"https://api.github.com/users/ajsharma/repos","events_url":"https://api.github.com/users/ajsharma/events{/privacy}","received_events_url":"https://api.github.com/users/ajsharma/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-26T06:00:56Z","updated_at":"2015-05-26T06:01:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd12b19e399e02dc596f9f747992683337c266a6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ajsharma/monologue/pulls/38/commits","review_comments_url":"https://api.github.com/repos/ajsharma/monologue/pulls/38/comments","review_comment_url":"https://api.github.com/repos/ajsharma/monologue/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ajsharma/monologue/issues/38/comments","statuses_url":"https://api.github.com/repos/ajsharma/monologue/statuses/ee5eb3011a41b9bae245c99e734605d8c2729f06","head":{"label":"ajsharma:bootstrap3","ref":"bootstrap3","sha":"ee5eb3011a41b9bae245c99e734605d8c2729f06","user":{"login":"ajsharma","id":766658,"avatar_url":"https://avatars.githubusercontent.com/u/766658?v=3","gravatar_id":"","url":"https://api.github.com/users/ajsharma","html_url":"https://github.com/ajsharma","followers_url":"https://api.github.com/users/ajsharma/followers","following_url":"https://api.github.com/users/ajsharma/following{/other_user}","gists_url":"https://api.github.com/users/ajsharma/gists{/gist_id}","starred_url":"https://api.github.com/users/ajsharma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajsharma/subscriptions","organizations_url":"https://api.github.com/users/ajsharma/orgs","repos_url":"https://api.github.com/users/ajsharma/repos","events_url":"https://api.github.com/users/ajsharma/events{/privacy}","received_events_url":"https://api.github.com/users/ajsharma/received_events","type":"User","site_admin":false},"repo":{"id":23133314,"name":"monologue","full_name":"ajsharma/monologue","owner":{"login":"ajsharma","id":766658,"avatar_url":"https://avatars.githubusercontent.com/u/766658?v=3","gravatar_id":"","url":"https://api.github.com/users/ajsharma","html_url":"https://github.com/ajsharma","followers_url":"https://api.github.com/users/ajsharma/followers","following_url":"https://api.github.com/users/ajsharma/following{/other_user}","gists_url":"https://api.github.com/users/ajsharma/gists{/gist_id}","starred_url":"https://api.github.com/users/ajsharma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajsharma/subscriptions","organizations_url":"https://api.github.com/users/ajsharma/orgs","repos_url":"https://api.github.com/users/ajsharma/repos","events_url":"https://api.github.com/users/ajsharma/events{/privacy}","received_events_url":"https://api.github.com/users/ajsharma/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ajsharma/monologue","description":"See all your github activity, not just the public stuff","fork":false,"url":"https://api.github.com/repos/ajsharma/monologue","forks_url":"https://api.github.com/repos/ajsharma/monologue/forks","keys_url":"https://api.github.com/repos/ajsharma/monologue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ajsharma/monologue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ajsharma/monologue/teams","hooks_url":"https://api.github.com/repos/ajsharma/monologue/hooks","issue_events_url":"https://api.github.com/repos/ajsharma/monologue/issues/events{/number}","events_url":"https://api.github.com/repos/ajsharma/monologue/events","assignees_url":"https://api.github.com/repos/ajsharma/monologue/assignees{/user}","branches_url":"https://api.github.com/repos/ajsharma/monologue/branches{/branch}","tags_url":"https://api.github.com/repos/ajsharma/monologue/tags","blobs_url":"https://api.github.com/repos/ajsharma/monologue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ajsharma/monologue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ajsharma/monologue/git/refs{/sha}","trees_url":"https://api.github.com/repos/ajsharma/monologue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ajsharma/monologue/statuses/{sha}","languages_url":"https://api.github.com/repos/ajsharma/monologue/languages","stargazers_url":"https://api.github.com/repos/ajsharma/monologue/stargazers","contributors_url":"https://api.github.com/repos/ajsharma/monologue/contributors","subscribers_url":"https://api.github.com/repos/ajsharma/monologue/subscribers","subscription_url":"https://api.github.com/repos/ajsharma/monologue/subscription","commits_url":"https://api.github.com/repos/ajsharma/monologue/commits{/sha}","git_commits_url":"https://api.github.com/repos/ajsharma/monologue/git/commits{/sha}","comments_url":"https://api.github.com/repos/ajsharma/monologue/comments{/number}","issue_comment_url":"https://api.github.com/repos/ajsharma/monologue/issues/comments{/number}","contents_url":"https://api.github.com/repos/ajsharma/monologue/contents/{+path}","compare_url":"https://api.github.com/repos/ajsharma/monologue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ajsharma/monologue/merges","archive_url":"https://api.github.com/repos/ajsharma/monologue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ajsharma/monologue/downloads","issues_url":"https://api.github.com/repos/ajsharma/monologue/issues{/number}","pulls_url":"https://api.github.com/repos/ajsharma/monologue/pulls{/number}","milestones_url":"https://api.github.com/repos/ajsharma/monologue/milestones{/number}","notifications_url":"https://api.github.com/repos/ajsharma/monologue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ajsharma/monologue/labels{/name}","releases_url":"https://api.github.com/repos/ajsharma/monologue/releases{/id}","created_at":"2014-08-20T02:36:08Z","updated_at":"2015-04-27T16:28:48Z","pushed_at":"2015-05-26T06:00:56Z","git_url":"git://github.com/ajsharma/monologue.git","ssh_url":"git@github.com:ajsharma/monologue.git","clone_url":"https://github.com/ajsharma/monologue.git","svn_url":"https://github.com/ajsharma/monologue","homepage":"","size":856,"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":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"ajsharma:master","ref":"master","sha":"86c5482d1c4c69ee3b5f9e7043d0a680f20df226","user":{"login":"ajsharma","id":766658,"avatar_url":"https://avatars.githubusercontent.com/u/766658?v=3","gravatar_id":"","url":"https://api.github.com/users/ajsharma","html_url":"https://github.com/ajsharma","followers_url":"https://api.github.com/users/ajsharma/followers","following_url":"https://api.github.com/users/ajsharma/following{/other_user}","gists_url":"https://api.github.com/users/ajsharma/gists{/gist_id}","starred_url":"https://api.github.com/users/ajsharma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajsharma/subscriptions","organizations_url":"https://api.github.com/users/ajsharma/orgs","repos_url":"https://api.github.com/users/ajsharma/repos","events_url":"https://api.github.com/users/ajsharma/events{/privacy}","received_events_url":"https://api.github.com/users/ajsharma/received_events","type":"User","site_admin":false},"repo":{"id":23133314,"name":"monologue","full_name":"ajsharma/monologue","owner":{"login":"ajsharma","id":766658,"avatar_url":"https://avatars.githubusercontent.com/u/766658?v=3","gravatar_id":"","url":"https://api.github.com/users/ajsharma","html_url":"https://github.com/ajsharma","followers_url":"https://api.github.com/users/ajsharma/followers","following_url":"https://api.github.com/users/ajsharma/following{/other_user}","gists_url":"https://api.github.com/users/ajsharma/gists{/gist_id}","starred_url":"https://api.github.com/users/ajsharma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajsharma/subscriptions","organizations_url":"https://api.github.com/users/ajsharma/orgs","repos_url":"https://api.github.com/users/ajsharma/repos","events_url":"https://api.github.com/users/ajsharma/events{/privacy}","received_events_url":"https://api.github.com/users/ajsharma/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ajsharma/monologue","description":"See all your github activity, not just the public stuff","fork":false,"url":"https://api.github.com/repos/ajsharma/monologue","forks_url":"https://api.github.com/repos/ajsharma/monologue/forks","keys_url":"https://api.github.com/repos/ajsharma/monologue/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ajsharma/monologue/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ajsharma/monologue/teams","hooks_url":"https://api.github.com/repos/ajsharma/monologue/hooks","issue_events_url":"https://api.github.com/repos/ajsharma/monologue/issues/events{/number}","events_url":"https://api.github.com/repos/ajsharma/monologue/events","assignees_url":"https://api.github.com/repos/ajsharma/monologue/assignees{/user}","branches_url":"https://api.github.com/repos/ajsharma/monologue/branches{/branch}","tags_url":"https://api.github.com/repos/ajsharma/monologue/tags","blobs_url":"https://api.github.com/repos/ajsharma/monologue/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ajsharma/monologue/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ajsharma/monologue/git/refs{/sha}","trees_url":"https://api.github.com/repos/ajsharma/monologue/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ajsharma/monologue/statuses/{sha}","languages_url":"https://api.github.com/repos/ajsharma/monologue/languages","stargazers_url":"https://api.github.com/repos/ajsharma/monologue/stargazers","contributors_url":"https://api.github.com/repos/ajsharma/monologue/contributors","subscribers_url":"https://api.github.com/repos/ajsharma/monologue/subscribers","subscription_url":"https://api.github.com/repos/ajsharma/monologue/subscription","commits_url":"https://api.github.com/repos/ajsharma/monologue/commits{/sha}","git_commits_url":"https://api.github.com/repos/ajsharma/monologue/git/commits{/sha}","comments_url":"https://api.github.com/repos/ajsharma/monologue/comments{/number}","issue_comment_url":"https://api.github.com/repos/ajsharma/monologue/issues/comments{/number}","contents_url":"https://api.github.com/repos/ajsharma/monologue/contents/{+path}","compare_url":"https://api.github.com/repos/ajsharma/monologue/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ajsharma/monologue/merges","archive_url":"https://api.github.com/repos/ajsharma/monologue/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ajsharma/monologue/downloads","issues_url":"https://api.github.com/repos/ajsharma/monologue/issues{/number}","pulls_url":"https://api.github.com/repos/ajsharma/monologue/pulls{/number}","milestones_url":"https://api.github.com/repos/ajsharma/monologue/milestones{/number}","notifications_url":"https://api.github.com/repos/ajsharma/monologue/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ajsharma/monologue/labels{/name}","releases_url":"https://api.github.com/repos/ajsharma/monologue/releases{/id}","created_at":"2014-08-20T02:36:08Z","updated_at":"2015-04-27T16:28:48Z","pushed_at":"2015-05-26T06:00:56Z","git_url":"git://github.com/ajsharma/monologue.git","ssh_url":"git@github.com:ajsharma/monologue.git","clone_url":"https://github.com/ajsharma/monologue.git","svn_url":"https://github.com/ajsharma/monologue","homepage":"","size":856,"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":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ajsharma/monologue/pulls/38"},"html":{"href":"https://github.com/ajsharma/monologue/pull/38"},"issue":{"href":"https://api.github.com/repos/ajsharma/monologue/issues/38"},"comments":{"href":"https://api.github.com/repos/ajsharma/monologue/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/ajsharma/monologue/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/ajsharma/monologue/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ajsharma/monologue/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/ajsharma/monologue/statuses/ee5eb3011a41b9bae245c99e734605d8c2729f06"}}}}