{"action":"created","comment":{"url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/pulls/comments/36847970","id":36847970,"diff_hunk":"@@ -1,52 +1,57 @@\n class Post < ActiveRecord::Base\n-  belongs_to :user\n-  has_and_belongs_to_many :tags\n-  has_many :comments, as: :parent\n+\tbelongs_to :user\n+\thas_and_belongs_to_many :tags\n+\thas_many :comments, as: :parent\n \n-  validates_presence_of :user, :title, :body_markdown\n+\tvalidates_presence_of :user, :title, :body_markdown\n \n-  before_save do\n-    parser = Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true)\n-    self.body_html = parser.render(body_markdown)\n-  end\n+\tbefore_save do\n+\t\tparser = Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true)\n+\t\tself.body_html = parser.render(body_markdown)\n+\tend\n \n-  after_create :notify_twitter\n+\tafter_create :notify_twitter\n   # TODO: move this to background job\n   def notify_twitter\n-    if not Rails.env.development? and not Rails.env.test?\n-      $twitter_client.update(tweet_content)\n-    end\n+  \tif not Rails.env.development? and not Rails.env.test?\n+  \t\t$twitter_client.update(tweet_content)\n+  \tend\n   end\n \n   def tweet_content\n-    url = Rails.application.routes.url_helpers.post_short_link_url(self, host: 'rbga.me')\n-    url = \" #{url}\"\n-    max_title_length = 140 - url.length\n-    title[0...max_title_length] + url\n+  \turl = Rails.application.routes.url_helpers.post_short_link_url(self, host: 'rbga.me')\n+  \turl = \" #{url}\"\n+  \tmax_title_length = 140 - url.length\n+  \ttitle[0...max_title_length] + url\n   end\n \n   def tags_string\n-    tags.map(&:title).join(\", \")\n+  \ttags.map(&:title).join(\", \")\n   end\n \n   def tags_string=(value)\n-    @tags_list = []\n-    value.strip.downcase.split(/, *| +/).each do |tag|\n-      @tags_list.push(tag.strip)\n-    end\n-    @tags_list = @tags_list.uniq\n+  \t@tags_list = []\n+  \tvalue.strip.downcase.split(/, *| +/).each do |tag|\n+  \t\t@tags_list << tag.strip\n+  \tend","path":"app/models/post.rb","position":58,"original_position":58,"commit_id":"db3dd01a04b4605a1545cb1469c0fb60cc1a6d4f","original_commit_id":"db3dd01a04b4605a1545cb1469c0fb60cc1a6d4f","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":"Tab detected.","created_at":"2015-08-12T11:08:18Z","updated_at":"2015-08-12T11:08:18Z","html_url":"https://github.com/ruby-rcade/RubyGameDev.com/pull/49#discussion_r36847970","pull_request_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/pulls/49","_links":{"self":{"href":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/pulls/comments/36847970"},"html":{"href":"https://github.com/ruby-rcade/RubyGameDev.com/pull/49#discussion_r36847970"},"pull_request":{"href":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/pulls/49","id":42021636,"html_url":"https://github.com/ruby-rcade/RubyGameDev.com/pull/49","diff_url":"https://github.com/ruby-rcade/RubyGameDev.com/pull/49.diff","patch_url":"https://github.com/ruby-rcade/RubyGameDev.com/pull/49.patch","issue_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/issues/49","number":49,"state":"open","locked":false,"title":"Search form","user":{"login":"soff22","id":9285851,"avatar_url":"https://avatars.githubusercontent.com/u/9285851?v=3","gravatar_id":"","url":"https://api.github.com/users/soff22","html_url":"https://github.com/soff22","followers_url":"https://api.github.com/users/soff22/followers","following_url":"https://api.github.com/users/soff22/following{/other_user}","gists_url":"https://api.github.com/users/soff22/gists{/gist_id}","starred_url":"https://api.github.com/users/soff22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soff22/subscriptions","organizations_url":"https://api.github.com/users/soff22/orgs","repos_url":"https://api.github.com/users/soff22/repos","events_url":"https://api.github.com/users/soff22/events{/privacy}","received_events_url":"https://api.github.com/users/soff22/received_events","type":"User","site_admin":false},"body":"Hi Andrew,\r\nthis is how we made the search form. I`m sending you attached 3 pics to check if the page is OK for you. If you have any other ideas or want something to be changed, please advise us.\r\n![display_page_with_no_entry](https://cloud.githubusercontent.com/assets/9285851/9172938/807f8408-3f7f-11e5-8439-1108bb98753a.png)\r\n![find_by_word_in_a_title](https://cloud.githubusercontent.com/assets/9285851/9172937/807e6ffa-3f7f-11e5-9757-2b678f46c49b.png)\r\n![no_result_found](https://cloud.githubusercontent.com/assets/9285851/9172939/8081ac92-3f7f-11e5-8a22-e15008abd959.png)\r\n\r\n\r\n ","created_at":"2015-08-10T13:49:36Z","updated_at":"2015-08-12T11:08:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e187b7ba7a9bfa45e8cc0711b34987b2f4f16472","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/pulls/49/commits","review_comments_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/pulls/49/comments","review_comment_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/issues/49/comments","statuses_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/statuses/db3dd01a04b4605a1545cb1469c0fb60cc1a6d4f","head":{"label":"RailsGEnthusiasts:search-form","ref":"search-form","sha":"db3dd01a04b4605a1545cb1469c0fb60cc1a6d4f","user":{"login":"RailsGEnthusiasts","id":11946787,"avatar_url":"https://avatars.githubusercontent.com/u/11946787?v=3","gravatar_id":"","url":"https://api.github.com/users/RailsGEnthusiasts","html_url":"https://github.com/RailsGEnthusiasts","followers_url":"https://api.github.com/users/RailsGEnthusiasts/followers","following_url":"https://api.github.com/users/RailsGEnthusiasts/following{/other_user}","gists_url":"https://api.github.com/users/RailsGEnthusiasts/gists{/gist_id}","starred_url":"https://api.github.com/users/RailsGEnthusiasts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RailsGEnthusiasts/subscriptions","organizations_url":"https://api.github.com/users/RailsGEnthusiasts/orgs","repos_url":"https://api.github.com/users/RailsGEnthusiasts/repos","events_url":"https://api.github.com/users/RailsGEnthusiasts/events{/privacy}","received_events_url":"https://api.github.com/users/RailsGEnthusiasts/received_events","type":"Organization","site_admin":false},"repo":{"id":38353268,"name":"RubyGameDev.com","full_name":"RailsGEnthusiasts/RubyGameDev.com","owner":{"login":"RailsGEnthusiasts","id":11946787,"avatar_url":"https://avatars.githubusercontent.com/u/11946787?v=3","gravatar_id":"","url":"https://api.github.com/users/RailsGEnthusiasts","html_url":"https://github.com/RailsGEnthusiasts","followers_url":"https://api.github.com/users/RailsGEnthusiasts/followers","following_url":"https://api.github.com/users/RailsGEnthusiasts/following{/other_user}","gists_url":"https://api.github.com/users/RailsGEnthusiasts/gists{/gist_id}","starred_url":"https://api.github.com/users/RailsGEnthusiasts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RailsGEnthusiasts/subscriptions","organizations_url":"https://api.github.com/users/RailsGEnthusiasts/orgs","repos_url":"https://api.github.com/users/RailsGEnthusiasts/repos","events_url":"https://api.github.com/users/RailsGEnthusiasts/events{/privacy}","received_events_url":"https://api.github.com/users/RailsGEnthusiasts/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RailsGEnthusiasts/RubyGameDev.com","description":"A community-contributed, information hub to help others build games in Ruby.","fork":true,"url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com","forks_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/forks","keys_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/teams","hooks_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/hooks","issue_events_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/issues/events{/number}","events_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/events","assignees_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/assignees{/user}","branches_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/branches{/branch}","tags_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/tags","blobs_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/statuses/{sha}","languages_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/languages","stargazers_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/stargazers","contributors_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/contributors","subscribers_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/subscribers","subscription_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/subscription","commits_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/contents/{+path}","compare_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/merges","archive_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/downloads","issues_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/issues{/number}","pulls_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/pulls{/number}","milestones_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/milestones{/number}","notifications_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/labels{/name}","releases_url":"https://api.github.com/repos/RailsGEnthusiasts/RubyGameDev.com/releases{/id}","created_at":"2015-07-01T06:15:33Z","updated_at":"2015-07-01T06:15:34Z","pushed_at":"2015-08-12T11:08:13Z","git_url":"git://github.com/RailsGEnthusiasts/RubyGameDev.com.git","ssh_url":"git@github.com:RailsGEnthusiasts/RubyGameDev.com.git","clone_url":"https://github.com/RailsGEnthusiasts/RubyGameDev.com.git","svn_url":"https://github.com/RailsGEnthusiasts/RubyGameDev.com","homepage":"http://www.rubygamedev.com","size":1149,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"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":"ruby-rcade:master","ref":"master","sha":"b84e48a414735b4030309e83fe955671f9cb9d65","user":{"login":"ruby-rcade","id":4380629,"avatar_url":"https://avatars.githubusercontent.com/u/4380629?v=3","gravatar_id":"","url":"https://api.github.com/users/ruby-rcade","html_url":"https://github.com/ruby-rcade","followers_url":"https://api.github.com/users/ruby-rcade/followers","following_url":"https://api.github.com/users/ruby-rcade/following{/other_user}","gists_url":"https://api.github.com/users/ruby-rcade/gists{/gist_id}","starred_url":"https://api.github.com/users/ruby-rcade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruby-rcade/subscriptions","organizations_url":"https://api.github.com/users/ruby-rcade/orgs","repos_url":"https://api.github.com/users/ruby-rcade/repos","events_url":"https://api.github.com/users/ruby-rcade/events{/privacy}","received_events_url":"https://api.github.com/users/ruby-rcade/received_events","type":"Organization","site_admin":false},"repo":{"id":13728103,"name":"RubyGameDev.com","full_name":"ruby-rcade/RubyGameDev.com","owner":{"login":"ruby-rcade","id":4380629,"avatar_url":"https://avatars.githubusercontent.com/u/4380629?v=3","gravatar_id":"","url":"https://api.github.com/users/ruby-rcade","html_url":"https://github.com/ruby-rcade","followers_url":"https://api.github.com/users/ruby-rcade/followers","following_url":"https://api.github.com/users/ruby-rcade/following{/other_user}","gists_url":"https://api.github.com/users/ruby-rcade/gists{/gist_id}","starred_url":"https://api.github.com/users/ruby-rcade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruby-rcade/subscriptions","organizations_url":"https://api.github.com/users/ruby-rcade/orgs","repos_url":"https://api.github.com/users/ruby-rcade/repos","events_url":"https://api.github.com/users/ruby-rcade/events{/privacy}","received_events_url":"https://api.github.com/users/ruby-rcade/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ruby-rcade/RubyGameDev.com","description":"A community-contributed, information hub to help others build games in Ruby.","fork":false,"url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com","forks_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/forks","keys_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/teams","hooks_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/hooks","issue_events_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/issues/events{/number}","events_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/events","assignees_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/assignees{/user}","branches_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/branches{/branch}","tags_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/tags","blobs_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/statuses/{sha}","languages_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/languages","stargazers_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/stargazers","contributors_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/contributors","subscribers_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/subscribers","subscription_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/subscription","commits_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/contents/{+path}","compare_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/merges","archive_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/downloads","issues_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/issues{/number}","pulls_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/pulls{/number}","milestones_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/milestones{/number}","notifications_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/labels{/name}","releases_url":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/releases{/id}","created_at":"2013-10-20T22:28:22Z","updated_at":"2015-07-22T22:59:13Z","pushed_at":"2015-08-12T11:08:13Z","git_url":"git://github.com/ruby-rcade/RubyGameDev.com.git","ssh_url":"git@github.com:ruby-rcade/RubyGameDev.com.git","clone_url":"https://github.com/ruby-rcade/RubyGameDev.com.git","svn_url":"https://github.com/ruby-rcade/RubyGameDev.com","homepage":"http://www.rubygamedev.com","size":1722,"stargazers_count":8,"watchers_count":8,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":22,"forks":6,"open_issues":22,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/pulls/49"},"html":{"href":"https://github.com/ruby-rcade/RubyGameDev.com/pull/49"},"issue":{"href":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/issues/49"},"comments":{"href":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/ruby-rcade/RubyGameDev.com/statuses/db3dd01a04b4605a1545cb1469c0fb60cc1a6d4f"}}}}