Flowdock
method

value_before_type_cast

Importance_0
v3.0.0 - Show latest stable - 0 notes - Class: ActionView::Helpers::InstanceTagMethods::ClassMethods
value_before_type_cast(object, method_name) public

No documentation

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

Hide source
# File actionpack/lib/action_view/helpers/form_helper.rb, line 1007
        def value_before_type_cast(object, method_name)
          unless object.nil?
            if object.respond_to?(method_name)
              object.send(method_name)
            # FIXME: this is AR dependent
            elsif object.respond_to?(method_name + "_before_type_cast")
              object.send(method_name + "_before_type_cast")
            else
              raise NoMethodError, "Model #{object.class} does not respond to #{method_name}"
            end
          end
        end
Register or log in to add new notes.