{"action":"created","comment":{"url":"https://api.github.com/repos/spree/spree/pulls/comments/31256930","id":31256930,"diff_hunk":"@@ -101,6 +101,13 @@ class Engine < ::Rails::Engine\n       initializer \"spree.core.checking_migrations\" do |app|\n         Migrations.new(config, engine_name).check\n       end\n+\n+      config.to_prepare do\n+        # Load application's model / class decorators\n+        Dir.glob(File.join(File.dirname(__FILE__), '../../../app/**/*_decorator*.rb')) do |c|","path":"core/lib/spree/core/engine.rb","position":7,"original_position":7,"commit_id":"55c2972a7fd40de27b2dbd24f563b6931bbcf434","original_commit_id":"55c2972a7fd40de27b2dbd24f563b6931bbcf434","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":"Line is too long. [93/80]<br>Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2015-05-28T17:25:25Z","updated_at":"2015-05-28T17:25:25Z","html_url":"https://github.com/spree/spree/pull/6424#discussion_r31256930","pull_request_url":"https://api.github.com/repos/spree/spree/pulls/6424","_links":{"self":{"href":"https://api.github.com/repos/spree/spree/pulls/comments/31256930"},"html":{"href":"https://github.com/spree/spree/pull/6424#discussion_r31256930"},"pull_request":{"href":"https://api.github.com/repos/spree/spree/pulls/6424"}}},"pull_request":{"url":"https://api.github.com/repos/spree/spree/pulls/6424","id":36153707,"html_url":"https://github.com/spree/spree/pull/6424","diff_url":"https://github.com/spree/spree/pull/6424.diff","patch_url":"https://github.com/spree/spree/pull/6424.patch","issue_url":"https://api.github.com/repos/spree/spree/issues/6424","number":6424,"state":"open","locked":false,"title":"Fix the destruction cascade of slugs history","user":{"login":"ddomingues","id":2476690,"avatar_url":"https://avatars.githubusercontent.com/u/2476690?v=3","gravatar_id":"","url":"https://api.github.com/users/ddomingues","html_url":"https://github.com/ddomingues","followers_url":"https://api.github.com/users/ddomingues/followers","following_url":"https://api.github.com/users/ddomingues/following{/other_user}","gists_url":"https://api.github.com/users/ddomingues/gists{/gist_id}","starred_url":"https://api.github.com/users/ddomingues/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddomingues/subscriptions","organizations_url":"https://api.github.com/users/ddomingues/orgs","repos_url":"https://api.github.com/users/ddomingues/repos","events_url":"https://api.github.com/users/ddomingues/events{/privacy}","received_events_url":"https://api.github.com/users/ddomingues/received_events","type":"User","site_admin":false},"body":"I saw that the add-on of friendly_id was changed from slugged to history to keep the history of slugs, on commit https://github.com/spree/spree/commit/e145a1631788cf7c19e4f1705b8c45a7a181cae6. This add-on creates a relationship [one_to_many](https://github.com/norman/friendly_id/blob/master/lib/friendly_id/history.rb) with a new model [Friendly::Slug](https://github.com/norman/friendly_id/blob/master/lib/friendly_id/slug.rb). However when the product is destroyed the slug history is deleted because it doesn't include **acts_as_paranoid**. So the main idea is lost when the history is deleted.\r\n\r\nI tried a lot of alternatives to fix this and as result I did these changes.\r\n\r\nTake a look and let me Know what did you think? If you have another idea I could change the PR.","created_at":"2015-05-25T18:58:02Z","updated_at":"2015-05-28T17:25:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3371245f8b2ec434a032f6623b2292449fcd8c53","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spree/spree/pulls/6424/commits","review_comments_url":"https://api.github.com/repos/spree/spree/pulls/6424/comments","review_comment_url":"https://api.github.com/repos/spree/spree/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spree/spree/issues/6424/comments","statuses_url":"https://api.github.com/repos/spree/spree/statuses/55c2972a7fd40de27b2dbd24f563b6931bbcf434","head":{"label":"ddomingues:fixes-cascade-destroy-of-slugs","ref":"fixes-cascade-destroy-of-slugs","sha":"55c2972a7fd40de27b2dbd24f563b6931bbcf434","user":{"login":"ddomingues","id":2476690,"avatar_url":"https://avatars.githubusercontent.com/u/2476690?v=3","gravatar_id":"","url":"https://api.github.com/users/ddomingues","html_url":"https://github.com/ddomingues","followers_url":"https://api.github.com/users/ddomingues/followers","following_url":"https://api.github.com/users/ddomingues/following{/other_user}","gists_url":"https://api.github.com/users/ddomingues/gists{/gist_id}","starred_url":"https://api.github.com/users/ddomingues/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddomingues/subscriptions","organizations_url":"https://api.github.com/users/ddomingues/orgs","repos_url":"https://api.github.com/users/ddomingues/repos","events_url":"https://api.github.com/users/ddomingues/events{/privacy}","received_events_url":"https://api.github.com/users/ddomingues/received_events","type":"User","site_admin":false},"repo":{"id":20341579,"name":"spree","full_name":"ddomingues/spree","owner":{"login":"ddomingues","id":2476690,"avatar_url":"https://avatars.githubusercontent.com/u/2476690?v=3","gravatar_id":"","url":"https://api.github.com/users/ddomingues","html_url":"https://github.com/ddomingues","followers_url":"https://api.github.com/users/ddomingues/followers","following_url":"https://api.github.com/users/ddomingues/following{/other_user}","gists_url":"https://api.github.com/users/ddomingues/gists{/gist_id}","starred_url":"https://api.github.com/users/ddomingues/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddomingues/subscriptions","organizations_url":"https://api.github.com/users/ddomingues/orgs","repos_url":"https://api.github.com/users/ddomingues/repos","events_url":"https://api.github.com/users/ddomingues/events{/privacy}","received_events_url":"https://api.github.com/users/ddomingues/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ddomingues/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":true,"url":"https://api.github.com/repos/ddomingues/spree","forks_url":"https://api.github.com/repos/ddomingues/spree/forks","keys_url":"https://api.github.com/repos/ddomingues/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ddomingues/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ddomingues/spree/teams","hooks_url":"https://api.github.com/repos/ddomingues/spree/hooks","issue_events_url":"https://api.github.com/repos/ddomingues/spree/issues/events{/number}","events_url":"https://api.github.com/repos/ddomingues/spree/events","assignees_url":"https://api.github.com/repos/ddomingues/spree/assignees{/user}","branches_url":"https://api.github.com/repos/ddomingues/spree/branches{/branch}","tags_url":"https://api.github.com/repos/ddomingues/spree/tags","blobs_url":"https://api.github.com/repos/ddomingues/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ddomingues/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ddomingues/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/ddomingues/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ddomingues/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/ddomingues/spree/languages","stargazers_url":"https://api.github.com/repos/ddomingues/spree/stargazers","contributors_url":"https://api.github.com/repos/ddomingues/spree/contributors","subscribers_url":"https://api.github.com/repos/ddomingues/spree/subscribers","subscription_url":"https://api.github.com/repos/ddomingues/spree/subscription","commits_url":"https://api.github.com/repos/ddomingues/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/ddomingues/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/ddomingues/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/ddomingues/spree/issues/comments{/number}","contents_url":"https://api.github.com/repos/ddomingues/spree/contents/{+path}","compare_url":"https://api.github.com/repos/ddomingues/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ddomingues/spree/merges","archive_url":"https://api.github.com/repos/ddomingues/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ddomingues/spree/downloads","issues_url":"https://api.github.com/repos/ddomingues/spree/issues{/number}","pulls_url":"https://api.github.com/repos/ddomingues/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/ddomingues/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/ddomingues/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ddomingues/spree/labels{/name}","releases_url":"https://api.github.com/repos/ddomingues/spree/releases{/id}","created_at":"2014-05-30T20:29:17Z","updated_at":"2015-03-31T20:07:55Z","pushed_at":"2015-05-28T17:25:18Z","git_url":"git://github.com/ddomingues/spree.git","ssh_url":"git@github.com:ddomingues/spree.git","clone_url":"https://github.com/ddomingues/spree.git","svn_url":"https://github.com/ddomingues/spree","homepage":"http://spreecommerce.com","size":73963,"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":"spree:2-4-stable","ref":"2-4-stable","sha":"1dd43f22b630dc8840234d59abe4d4eaa2c43623","user":{"login":"spree","id":56702,"avatar_url":"https://avatars.githubusercontent.com/u/56702?v=3","gravatar_id":"","url":"https://api.github.com/users/spree","html_url":"https://github.com/spree","followers_url":"https://api.github.com/users/spree/followers","following_url":"https://api.github.com/users/spree/following{/other_user}","gists_url":"https://api.github.com/users/spree/gists{/gist_id}","starred_url":"https://api.github.com/users/spree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spree/subscriptions","organizations_url":"https://api.github.com/users/spree/orgs","repos_url":"https://api.github.com/users/spree/repos","events_url":"https://api.github.com/users/spree/events{/privacy}","received_events_url":"https://api.github.com/users/spree/received_events","type":"Organization","site_admin":false},"repo":{"id":3314,"name":"spree","full_name":"spree/spree","owner":{"login":"spree","id":56702,"avatar_url":"https://avatars.githubusercontent.com/u/56702?v=3","gravatar_id":"","url":"https://api.github.com/users/spree","html_url":"https://github.com/spree","followers_url":"https://api.github.com/users/spree/followers","following_url":"https://api.github.com/users/spree/following{/other_user}","gists_url":"https://api.github.com/users/spree/gists{/gist_id}","starred_url":"https://api.github.com/users/spree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spree/subscriptions","organizations_url":"https://api.github.com/users/spree/orgs","repos_url":"https://api.github.com/users/spree/repos","events_url":"https://api.github.com/users/spree/events{/privacy}","received_events_url":"https://api.github.com/users/spree/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spree/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":false,"url":"https://api.github.com/repos/spree/spree","forks_url":"https://api.github.com/repos/spree/spree/forks","keys_url":"https://api.github.com/repos/spree/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spree/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spree/spree/teams","hooks_url":"https://api.github.com/repos/spree/spree/hooks","issue_events_url":"https://api.github.com/repos/spree/spree/issues/events{/number}","events_url":"https://api.github.com/repos/spree/spree/events","assignees_url":"https://api.github.com/repos/spree/spree/assignees{/user}","branches_url":"https://api.github.com/repos/spree/spree/branches{/branch}","tags_url":"https://api.github.com/repos/spree/spree/tags","blobs_url":"https://api.github.com/repos/spree/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spree/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spree/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/spree/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spree/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/spree/spree/languages","stargazers_url":"https://api.github.com/repos/spree/spree/stargazers","contributors_url":"https://api.github.com/repos/spree/spree/contributors","subscribers_url":"https://api.github.com/repos/spree/spree/subscribers","subscription_url":"https://api.github.com/repos/spree/spree/subscription","commits_url":"https://api.github.com/repos/spree/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/spree/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/spree/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/spree/spree/issues/comments{/number}","contents_url":"https://api.github.com/repos/spree/spree/contents/{+path}","compare_url":"https://api.github.com/repos/spree/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spree/spree/merges","archive_url":"https://api.github.com/repos/spree/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spree/spree/downloads","issues_url":"https://api.github.com/repos/spree/spree/issues{/number}","pulls_url":"https://api.github.com/repos/spree/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/spree/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/spree/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spree/spree/labels{/name}","releases_url":"https://api.github.com/repos/spree/spree/releases{/id}","created_at":"2008-03-10T14:45:35Z","updated_at":"2015-05-28T12:05:03Z","pushed_at":"2015-05-28T17:25:20Z","git_url":"git://github.com/spree/spree.git","ssh_url":"git@github.com:spree/spree.git","clone_url":"https://github.com/spree/spree.git","svn_url":"https://github.com/spree/spree","homepage":"http://spreecommerce.com","size":139134,"stargazers_count":6377,"watchers_count":6377,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2983,"mirror_url":null,"open_issues_count":127,"forks":2983,"open_issues":127,"watchers":6377,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spree/spree/pulls/6424"},"html":{"href":"https://github.com/spree/spree/pull/6424"},"issue":{"href":"https://api.github.com/repos/spree/spree/issues/6424"},"comments":{"href":"https://api.github.com/repos/spree/spree/issues/6424/comments"},"review_comments":{"href":"https://api.github.com/repos/spree/spree/pulls/6424/comments"},"review_comment":{"href":"https://api.github.com/repos/spree/spree/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spree/spree/pulls/6424/commits"},"statuses":{"href":"https://api.github.com/repos/spree/spree/statuses/55c2972a7fd40de27b2dbd24f563b6931bbcf434"}}}}