Skip to content

Commit

Permalink
Checking method in both a ruby 1.8 and 1.9 compatible way.
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenboyd committed Jan 21, 2011
1 parent 6fd7ceb commit 9d9dca0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/technoweenie/attachment_fu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,8 @@ def on_one_store(method, backend, *args)
else
with_each_store(true) { |store|
# using methods.include instead of respond_to? because the delegation has already screwed up respond_to?
if store.methods.include?(method.to_s)
# checking both the string (ruby 1.8) and the symbol (ruby 1.9)
if store.methods.include?(method.to_s) || store.methods.include?(method.to_sym)
delegator = store
break
end
Expand Down

0 comments on commit 9d9dca0

Please sign in to comment.