{"action":"created","comment":{"url":"https://api.github.com/repos/edraut/pulitzer/pulls/comments/44179471","id":44179471,"diff_hunk":"@@ -1,11 +1,12 @@\n module Pulitzer\n   class Post < ActiveRecord::Base\n     extend ::FriendlyId\n+    has_many :versions\n     belongs_to :post_type\n-    has_many :content_elements, dependent: :destroy\n-    has_many :post_tags, dependent: :destroy\n     delegate :post_type_content_element_types, to: :post_type\n+    delegate :content_elements, :post_tags, to: :preview_version","path":"app/models/pulitzer/post.rb","position":9,"original_position":9,"commit_id":"48b9c0da3b28d009a10388dfd7f7544302a58e30","original_commit_id":"566fe76a784ee344ee666d480e4de87a4728ac58","user":{"login":"gomayonqui","id":1708733,"avatar_url":"https://avatars.githubusercontent.com/u/1708733?v=3","gravatar_id":"","url":"https://api.github.com/users/gomayonqui","html_url":"https://github.com/gomayonqui","followers_url":"https://api.github.com/users/gomayonqui/followers","following_url":"https://api.github.com/users/gomayonqui/following{/other_user}","gists_url":"https://api.github.com/users/gomayonqui/gists{/gist_id}","starred_url":"https://api.github.com/users/gomayonqui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gomayonqui/subscriptions","organizations_url":"https://api.github.com/users/gomayonqui/orgs","repos_url":"https://api.github.com/users/gomayonqui/repos","events_url":"https://api.github.com/users/gomayonqui/events{/privacy}","received_events_url":"https://api.github.com/users/gomayonqui/received_events","type":"User","site_admin":false},"body":"Got it, for the public implementation will be easier doing just `post.content_elements`, sure I will change this.","created_at":"2015-11-06T19:47:23Z","updated_at":"2015-11-06T19:47:23Z","html_url":"https://github.com/edraut/pulitzer/pull/17#discussion_r44179471","pull_request_url":"https://api.github.com/repos/edraut/pulitzer/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/edraut/pulitzer/pulls/comments/44179471"},"html":{"href":"https://github.com/edraut/pulitzer/pull/17#discussion_r44179471"},"pull_request":{"href":"https://api.github.com/repos/edraut/pulitzer/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/edraut/pulitzer/pulls/17","id":49719094,"html_url":"https://github.com/edraut/pulitzer/pull/17","diff_url":"https://github.com/edraut/pulitzer/pull/17.diff","patch_url":"https://github.com/edraut/pulitzer/pull/17.patch","issue_url":"https://api.github.com/repos/edraut/pulitzer/issues/17","number":17,"state":"open","locked":false,"title":"Add versions for a post","user":{"login":"gomayonqui","id":1708733,"avatar_url":"https://avatars.githubusercontent.com/u/1708733?v=3","gravatar_id":"","url":"https://api.github.com/users/gomayonqui","html_url":"https://github.com/gomayonqui","followers_url":"https://api.github.com/users/gomayonqui/followers","following_url":"https://api.github.com/users/gomayonqui/following{/other_user}","gists_url":"https://api.github.com/users/gomayonqui/gists{/gist_id}","starred_url":"https://api.github.com/users/gomayonqui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gomayonqui/subscriptions","organizations_url":"https://api.github.com/users/gomayonqui/orgs","repos_url":"https://api.github.com/users/gomayonqui/repos","events_url":"https://api.github.com/users/gomayonqui/events{/privacy}","received_events_url":"https://api.github.com/users/gomayonqui/received_events","type":"User","site_admin":false},"body":"- Add different version for a post having always an active one.\r\n- Add preview button","created_at":"2015-11-04T17:28:16Z","updated_at":"2015-11-06T19:47:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"885dc5c25d4671f06ee5e9c3ad26918faff011a7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edraut/pulitzer/pulls/17/commits","review_comments_url":"https://api.github.com/repos/edraut/pulitzer/pulls/17/comments","review_comment_url":"https://api.github.com/repos/edraut/pulitzer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edraut/pulitzer/issues/17/comments","statuses_url":"https://api.github.com/repos/edraut/pulitzer/statuses/48b9c0da3b28d009a10388dfd7f7544302a58e30","head":{"label":"edraut:add-versions","ref":"add-versions","sha":"48b9c0da3b28d009a10388dfd7f7544302a58e30","user":{"login":"edraut","id":15188,"avatar_url":"https://avatars.githubusercontent.com/u/15188?v=3","gravatar_id":"","url":"https://api.github.com/users/edraut","html_url":"https://github.com/edraut","followers_url":"https://api.github.com/users/edraut/followers","following_url":"https://api.github.com/users/edraut/following{/other_user}","gists_url":"https://api.github.com/users/edraut/gists{/gist_id}","starred_url":"https://api.github.com/users/edraut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edraut/subscriptions","organizations_url":"https://api.github.com/users/edraut/orgs","repos_url":"https://api.github.com/users/edraut/repos","events_url":"https://api.github.com/users/edraut/events{/privacy}","received_events_url":"https://api.github.com/users/edraut/received_events","type":"User","site_admin":false},"repo":{"id":37878641,"name":"pulitzer","full_name":"edraut/pulitzer","owner":{"login":"edraut","id":15188,"avatar_url":"https://avatars.githubusercontent.com/u/15188?v=3","gravatar_id":"","url":"https://api.github.com/users/edraut","html_url":"https://github.com/edraut","followers_url":"https://api.github.com/users/edraut/followers","following_url":"https://api.github.com/users/edraut/following{/other_user}","gists_url":"https://api.github.com/users/edraut/gists{/gist_id}","starred_url":"https://api.github.com/users/edraut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edraut/subscriptions","organizations_url":"https://api.github.com/users/edraut/orgs","repos_url":"https://api.github.com/users/edraut/repos","events_url":"https://api.github.com/users/edraut/events{/privacy}","received_events_url":"https://api.github.com/users/edraut/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/edraut/pulitzer","description":"A content management engine for Ruby on Rails.","fork":false,"url":"https://api.github.com/repos/edraut/pulitzer","forks_url":"https://api.github.com/repos/edraut/pulitzer/forks","keys_url":"https://api.github.com/repos/edraut/pulitzer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edraut/pulitzer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edraut/pulitzer/teams","hooks_url":"https://api.github.com/repos/edraut/pulitzer/hooks","issue_events_url":"https://api.github.com/repos/edraut/pulitzer/issues/events{/number}","events_url":"https://api.github.com/repos/edraut/pulitzer/events","assignees_url":"https://api.github.com/repos/edraut/pulitzer/assignees{/user}","branches_url":"https://api.github.com/repos/edraut/pulitzer/branches{/branch}","tags_url":"https://api.github.com/repos/edraut/pulitzer/tags","blobs_url":"https://api.github.com/repos/edraut/pulitzer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edraut/pulitzer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edraut/pulitzer/git/refs{/sha}","trees_url":"https://api.github.com/repos/edraut/pulitzer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edraut/pulitzer/statuses/{sha}","languages_url":"https://api.github.com/repos/edraut/pulitzer/languages","stargazers_url":"https://api.github.com/repos/edraut/pulitzer/stargazers","contributors_url":"https://api.github.com/repos/edraut/pulitzer/contributors","subscribers_url":"https://api.github.com/repos/edraut/pulitzer/subscribers","subscription_url":"https://api.github.com/repos/edraut/pulitzer/subscription","commits_url":"https://api.github.com/repos/edraut/pulitzer/commits{/sha}","git_commits_url":"https://api.github.com/repos/edraut/pulitzer/git/commits{/sha}","comments_url":"https://api.github.com/repos/edraut/pulitzer/comments{/number}","issue_comment_url":"https://api.github.com/repos/edraut/pulitzer/issues/comments{/number}","contents_url":"https://api.github.com/repos/edraut/pulitzer/contents/{+path}","compare_url":"https://api.github.com/repos/edraut/pulitzer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edraut/pulitzer/merges","archive_url":"https://api.github.com/repos/edraut/pulitzer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edraut/pulitzer/downloads","issues_url":"https://api.github.com/repos/edraut/pulitzer/issues{/number}","pulls_url":"https://api.github.com/repos/edraut/pulitzer/pulls{/number}","milestones_url":"https://api.github.com/repos/edraut/pulitzer/milestones{/number}","notifications_url":"https://api.github.com/repos/edraut/pulitzer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edraut/pulitzer/labels{/name}","releases_url":"https://api.github.com/repos/edraut/pulitzer/releases{/id}","created_at":"2015-06-22T20:21:41Z","updated_at":"2015-08-28T16:26:20Z","pushed_at":"2015-11-06T16:21:30Z","git_url":"git://github.com/edraut/pulitzer.git","ssh_url":"git@github.com:edraut/pulitzer.git","clone_url":"https://github.com/edraut/pulitzer.git","svn_url":"https://github.com/edraut/pulitzer","homepage":"","size":1179,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"edraut:master","ref":"master","sha":"61cda3e821c7605dc8fe03cccc4511b17546efe2","user":{"login":"edraut","id":15188,"avatar_url":"https://avatars.githubusercontent.com/u/15188?v=3","gravatar_id":"","url":"https://api.github.com/users/edraut","html_url":"https://github.com/edraut","followers_url":"https://api.github.com/users/edraut/followers","following_url":"https://api.github.com/users/edraut/following{/other_user}","gists_url":"https://api.github.com/users/edraut/gists{/gist_id}","starred_url":"https://api.github.com/users/edraut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edraut/subscriptions","organizations_url":"https://api.github.com/users/edraut/orgs","repos_url":"https://api.github.com/users/edraut/repos","events_url":"https://api.github.com/users/edraut/events{/privacy}","received_events_url":"https://api.github.com/users/edraut/received_events","type":"User","site_admin":false},"repo":{"id":37878641,"name":"pulitzer","full_name":"edraut/pulitzer","owner":{"login":"edraut","id":15188,"avatar_url":"https://avatars.githubusercontent.com/u/15188?v=3","gravatar_id":"","url":"https://api.github.com/users/edraut","html_url":"https://github.com/edraut","followers_url":"https://api.github.com/users/edraut/followers","following_url":"https://api.github.com/users/edraut/following{/other_user}","gists_url":"https://api.github.com/users/edraut/gists{/gist_id}","starred_url":"https://api.github.com/users/edraut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edraut/subscriptions","organizations_url":"https://api.github.com/users/edraut/orgs","repos_url":"https://api.github.com/users/edraut/repos","events_url":"https://api.github.com/users/edraut/events{/privacy}","received_events_url":"https://api.github.com/users/edraut/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/edraut/pulitzer","description":"A content management engine for Ruby on Rails.","fork":false,"url":"https://api.github.com/repos/edraut/pulitzer","forks_url":"https://api.github.com/repos/edraut/pulitzer/forks","keys_url":"https://api.github.com/repos/edraut/pulitzer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edraut/pulitzer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edraut/pulitzer/teams","hooks_url":"https://api.github.com/repos/edraut/pulitzer/hooks","issue_events_url":"https://api.github.com/repos/edraut/pulitzer/issues/events{/number}","events_url":"https://api.github.com/repos/edraut/pulitzer/events","assignees_url":"https://api.github.com/repos/edraut/pulitzer/assignees{/user}","branches_url":"https://api.github.com/repos/edraut/pulitzer/branches{/branch}","tags_url":"https://api.github.com/repos/edraut/pulitzer/tags","blobs_url":"https://api.github.com/repos/edraut/pulitzer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edraut/pulitzer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edraut/pulitzer/git/refs{/sha}","trees_url":"https://api.github.com/repos/edraut/pulitzer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edraut/pulitzer/statuses/{sha}","languages_url":"https://api.github.com/repos/edraut/pulitzer/languages","stargazers_url":"https://api.github.com/repos/edraut/pulitzer/stargazers","contributors_url":"https://api.github.com/repos/edraut/pulitzer/contributors","subscribers_url":"https://api.github.com/repos/edraut/pulitzer/subscribers","subscription_url":"https://api.github.com/repos/edraut/pulitzer/subscription","commits_url":"https://api.github.com/repos/edraut/pulitzer/commits{/sha}","git_commits_url":"https://api.github.com/repos/edraut/pulitzer/git/commits{/sha}","comments_url":"https://api.github.com/repos/edraut/pulitzer/comments{/number}","issue_comment_url":"https://api.github.com/repos/edraut/pulitzer/issues/comments{/number}","contents_url":"https://api.github.com/repos/edraut/pulitzer/contents/{+path}","compare_url":"https://api.github.com/repos/edraut/pulitzer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edraut/pulitzer/merges","archive_url":"https://api.github.com/repos/edraut/pulitzer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edraut/pulitzer/downloads","issues_url":"https://api.github.com/repos/edraut/pulitzer/issues{/number}","pulls_url":"https://api.github.com/repos/edraut/pulitzer/pulls{/number}","milestones_url":"https://api.github.com/repos/edraut/pulitzer/milestones{/number}","notifications_url":"https://api.github.com/repos/edraut/pulitzer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edraut/pulitzer/labels{/name}","releases_url":"https://api.github.com/repos/edraut/pulitzer/releases{/id}","created_at":"2015-06-22T20:21:41Z","updated_at":"2015-08-28T16:26:20Z","pushed_at":"2015-11-06T16:21:30Z","git_url":"git://github.com/edraut/pulitzer.git","ssh_url":"git@github.com:edraut/pulitzer.git","clone_url":"https://github.com/edraut/pulitzer.git","svn_url":"https://github.com/edraut/pulitzer","homepage":"","size":1179,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edraut/pulitzer/pulls/17"},"html":{"href":"https://github.com/edraut/pulitzer/pull/17"},"issue":{"href":"https://api.github.com/repos/edraut/pulitzer/issues/17"},"comments":{"href":"https://api.github.com/repos/edraut/pulitzer/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/edraut/pulitzer/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/edraut/pulitzer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edraut/pulitzer/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/edraut/pulitzer/statuses/48b9c0da3b28d009a10388dfd7f7544302a58e30"}}}}