Flowdock
method

submit_default_value

Importance_0
v3.0.5 - Show latest stable - 0 notes - Class: ActionView::Helpers::FormBuilder
submit_default_value() private

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 1238
        def submit_default_value
          object = @object.respond_to?(:to_model) ? @object.to_model : @object
          key    = object ? (object.persisted? ? :update : :create) : :submit

          model = if object.class.respond_to?(:model_name)
            object.class.model_name.human
          else
            @object_name.to_s.humanize
          end

          defaults = []
          defaults << "helpers.submit.#{object_name}.#{key}""helpers.submit.#{object_name}.#{key}"
          defaults << "helpers.submit.#{key}""helpers.submit.#{key}"
          defaults << "#{key.to_s.humanize} #{model}"

          I18n.t(defaults.shift, :model => model, :default => defaults)
        end
Register or log in to add new notes.