Skip to content

Commit

Permalink
fix bug by ensuring we're comparing Integers
Browse files Browse the repository at this point in the history
  • Loading branch information
justinfrench committed Sep 1, 2014
1 parent 7786813 commit 5e3cc47
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/formtastic/inputs/boolean_input.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ def boolean_checked?(value, checked_value)
value
when NilClass
false
when Integer, String
when Integer
value == checked_value.to_i
when String
value == checked_value
when Array
value.include?(checked_value)
Expand Down

0 comments on commit 5e3cc47

Please sign in to comment.