Method: String#to_boolean
- Defined in:
- lib/active_form/core_extensions.rb
#to_boolean ⇒ Object
41 42 43 |
# File 'lib/active_form/core_extensions.rb', line 41 def to_boolean ['1', 'y', 'yes', 'j', 'on', 'true', 't'].include?(self.downcase) end |