diff --git a/lib/active_flag/value.rb b/lib/active_flag/value.rb index e5269ff..9030f30 100644 --- a/lib/active_flag/value.rb +++ b/lib/active_flag/value.rb @@ -48,8 +48,8 @@ def unset?(key) end def method_missing(symbol, *args, &block) - if key = symbol.to_s.chomp!('?') and @definition.keys.include?(key.to_sym) - set?(key.to_sym) + if key = symbol.to_s.chomp('?').to_sym and @definition.keys.include?(key) + set?(key) else super end