Hi,
> First: The latest version of Paperclip causes a complaint about a
> hash, I'm not sure why and I'm not qualified to chase the problem
> down.
I'm using following code (placed as
config/initializers/99_paperclip_hash_patch.rb) with paperclip gem
2.3.11 (not a plugin) and ruby 1.9.2p136:
# Paperclip::Attachment#hash returns a string which is not conforming
# to Kernel#hash standard, so it can not be used as a key in Hash.
#
# This patch renames Paperclip::Attachment#hash to #secure_hash and
# restores original #hash behavior.
module Paperclip
class Attachment
alias_method :secure_hash, :hash
remove_method :hash
end
module Interpolations
def hash attachment, style_name
attachment.secure_hash(style_name)
end
end
end
-----
Tomoaki Hayasaka <[email protected]>
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.