Flowdock
method

cast

Importance_0
v7.1.3.2 - Show latest stable - 0 notes - Class: EnumType
cast(value) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/enum.rb, line 180
      def cast(value)
        if mapping.has_key?(value)
          value.to_s
        elsif mapping.has_value?(value)
          mapping.key(value)
        else
          value.presence
        end
      end
Register or log in to add new notes.