This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Reflection and removal of attachment_definitions #1268
Comments
Same with 40bdd3d, it removes |
What's the best way to get the paperclip attachment options for a given class now. I'd like to get Delayed Paperclip up to speed quickly but it was fully dependent on #attachment_defintions. |
From begin
# new syntax (version > 3.4.2, commit on 2013-06-14)
opts = ::Paperclip::Tasks::Attachments.definitions_for(self.class)[name]
rescue
# old syntax (version <= 3.4.2)
opts = self.class.attachment_definitions[name]
end Please let me know if there's a better way to do it. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
With dad6086 the only registry of paperclip attachments for each class was removed.
How are things doing reflection (automatically building UIs, serialization, ...) supposed to find all paperclip attachments for a class now? I see that there is
Paperclip::Tasks::Attachments.names_for(klass)
now, but this only seems to be intended for rake tasks as its namespace suggests.The text was updated successfully, but these errors were encountered: