Skip to content

Commit

Permalink
Added support for symbols in collections
Browse files Browse the repository at this point in the history
  • Loading branch information
dwbutler committed Sep 4, 2012
1 parent 4bd0330 commit 8039826
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/formtastic/inputs/base/collections.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def send_or_call(duck, object)
# Avoids an issue where `send_or_call` can be a String and duck can be something simple like # Avoids an issue where `send_or_call` can be a String and duck can be something simple like
# `:first`, which obviously String responds to. # `:first`, which obviously String responds to.
def send_or_call_or_object(duck, object) def send_or_call_or_object(duck, object)
return object if object.is_a?(String) || object.is_a?(Integer) # TODO what about other classes etc? return object if object.is_a?(String) || object.is_a?(Integer) || object.is_a?(Symbol) # TODO what about other classes etc?
send_or_call(duck, object) send_or_call(duck, object)
end end


Expand Down

0 comments on commit 8039826

Please sign in to comment.