google-code-export / ruby-activeldap

Automatically exported from code.google.com/p/ruby-activeldap
Other
1 stars 1 forks source link

Boolean #44

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If one use checkbox in rails application for boolen values, params has will
contains "1" or "0" strings. 
It would be nice if syntaxes boolen class convert it to boolean value like
this:

  def normalize_value(value)
          case value
          when true, 1, "1"
            "TRUE"
          when false, 0, "0"
            "FALSE"
          else
            value
          end
        end

Original issue reported on code.google.com by projektt...@gmail.com on 24 May 2010 at 6:01

GoogleCodeExporter commented 9 years ago
OK. "1" and "0" are accepted as boolean value.
But 1 and 0 aren't accepted. Are they needed?

Original comment by kou...@gmail.com on 30 May 2010 at 9:32