{"action":"created","issue":{"url":"https://api.github.com/repos/thoughtbot/paperclip/issues/1853","labels_url":"https://api.github.com/repos/thoughtbot/paperclip/issues/1853/labels{/name}","comments_url":"https://api.github.com/repos/thoughtbot/paperclip/issues/1853/comments","events_url":"https://api.github.com/repos/thoughtbot/paperclip/issues/1853/events","html_url":"https://github.com/thoughtbot/paperclip/pull/1853","id":75646887,"number":1853,"title":"allow sublcasses to override definitions","user":{"login":"midu","id":188390,"avatar_url":"https://avatars.githubusercontent.com/u/188390?v=3","gravatar_id":"","url":"https://api.github.com/users/midu","html_url":"https://github.com/midu","followers_url":"https://api.github.com/users/midu/followers","following_url":"https://api.github.com/users/midu/following{/other_user}","gists_url":"https://api.github.com/users/midu/gists{/gist_id}","starred_url":"https://api.github.com/users/midu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/midu/subscriptions","organizations_url":"https://api.github.com/users/midu/orgs","repos_url":"https://api.github.com/users/midu/repos","events_url":"https://api.github.com/users/midu/events{/privacy}","received_events_url":"https://api.github.com/users/midu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-12T15:47:40Z","updated_at":"2015-05-21T16:03:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/thoughtbot/paperclip/pulls/1853","html_url":"https://github.com/thoughtbot/paperclip/pull/1853","diff_url":"https://github.com/thoughtbot/paperclip/pull/1853.diff","patch_url":"https://github.com/thoughtbot/paperclip/pull/1853.patch"},"body":"It seems like when redefining attachment definitions in STI classes, only the styles from the parent class are being picked up. \r\n\r\n```rb\r\nclass Photo < ActiveRecord::Base\r\n  has_attached_file :data, styles: { small: \"70x70#\" }\r\n# ...\r\n\r\n\r\nclass UserPhoto < Photo\r\n  has_attachment_file :data, styles: { small: \"100x100>\" }\r\n# ...\r\n```\r\n\r\nExpectation:\r\n\r\n```rb\r\nUserPhoto.attachment_definitions[:data][:styles] == { small: \"100x100>\" }\r\n```\r\n\r\nReality: \r\n\r\n```rb\r\nUserPhoto.attachment_definitions[:data][:styles] == { small:  \"70x70#\" }\r\n```\r\n\r\nThat seems like a strange behavior, and it definitely didn't do that in earlier versions of paperclip (like 3.4.0, where we're upgrading from).\r\n\r\nThis PR addresses this issue, let us know what you think.\r\n\r\ncc-ing @mgerrior who found and fixed the issue"},"comment":{"url":"https://api.github.com/repos/thoughtbot/paperclip/issues/comments/104332653","html_url":"https://github.com/thoughtbot/paperclip/pull/1853#issuecomment-104332653","issue_url":"https://api.github.com/repos/thoughtbot/paperclip/issues/1853","id":104332653,"user":{"login":"tute","id":54260,"avatar_url":"https://avatars.githubusercontent.com/u/54260?v=3","gravatar_id":"","url":"https://api.github.com/users/tute","html_url":"https://github.com/tute","followers_url":"https://api.github.com/users/tute/followers","following_url":"https://api.github.com/users/tute/following{/other_user}","gists_url":"https://api.github.com/users/tute/gists{/gist_id}","starred_url":"https://api.github.com/users/tute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tute/subscriptions","organizations_url":"https://api.github.com/users/tute/orgs","repos_url":"https://api.github.com/users/tute/repos","events_url":"https://api.github.com/users/tute/events{/privacy}","received_events_url":"https://api.github.com/users/tute/received_events","type":"User","site_admin":false},"created_at":"2015-05-21T16:03:03Z","updated_at":"2015-05-21T16:03:03Z","body":"@midu hopefully tomorrow Friday @jyurek helps me doing some PR reviews. Sorry we've been busy and couldn't respond timely."}}