Sha256: b114d78d6e79d3737b57eec580fc0807f96b7473e66bf0e5a8e4326d305b12c6

Contents?: true

Size: 488 Bytes

Versions: 25

Compression:

Stored size: 488 Bytes

Contents

module Formtastic
  # @private
  module HtmlAttributes

    protected

    def humanized_attribute_name(method)
      if @object && @object.class.respond_to?(:human_attribute_name)
        humanized_name = @object.class.human_attribute_name(method.to_s)
        if humanized_name == method.to_s.send(:humanize)
          method.to_s.send(label_str_method)
        else
          humanized_name
        end
      else
        method.to_s.send(label_str_method)
      end
    end

  end
end

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
formtastic-3.0.0 lib/formtastic/html_attributes.rb
formtastic-3.0.0.rc2 lib/formtastic/html_attributes.rb
formtastic-2.3.1 lib/formtastic/html_attributes.rb
formtastic-2.3.0 lib/formtastic/html_attributes.rb
formtastic-3.0.0.rc lib/formtastic/html_attributes.rb
formtastic-2.3.0.rc4 lib/formtastic/html_attributes.rb
formtastic-2.3.0.rc3 lib/formtastic/html_attributes.rb
formtastic-2.3.0.rc2 lib/formtastic/html_attributes.rb
formtastic-2.3.0.rc lib/formtastic/html_attributes.rb
formtastic-2.2.1 lib/formtastic/html_attributes.rb
formtastic-2.2.0 lib/formtastic/html_attributes.rb
formtastic-2.2.0.rc lib/formtastic/html_attributes.rb
formtastic-2.1.1 lib/formtastic/html_attributes.rb
formtastic-2.1.0 lib/formtastic/html_attributes.rb
formtastic-2.1.0.rc lib/formtastic/html_attributes.rb
formtastic-2.1.0.beta1 lib/formtastic/html_attributes.rb
formtastic-2.0.2 lib/formtastic/html_attributes.rb
formtastic-2.0.1 lib/formtastic/html_attributes.rb
formtastic-2.0.0 lib/formtastic/html_attributes.rb
formtastic-2.0.0.rc5 lib/formtastic/html_attributes.rb