Sha256: 8e96fde63d8249f86a16148e9ef1f422eb5567da33a726d5b9de1d6caee7f387

Contents?: true

Size: 438 Bytes

Versions: 19

Compression:

Stored size: 438 Bytes

Contents

module Formtastic
  module LocalizedString

    def model_name
      @object.present? ? @object.class.name : @object_name.to_s.classify
    end

    protected

    def localized_string(key, value, type, options = {}) #:nodoc:
      current_builder = respond_to?(:builder) ? builder : self
      localizer = Formtastic::FormBuilder.i18n_localizer.new(current_builder)
      localizer.localize(key, value, type, options)
    end

  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
formtastic-3.1.0 lib/formtastic/localized_string.rb
formtastic-3.1.0.rc2 lib/formtastic/localized_string.rb
formtastic-3.1.0.rc1 lib/formtastic/localized_string.rb
formtastic-3.0.0 lib/formtastic/localized_string.rb
formtastic-3.0.0.rc2 lib/formtastic/localized_string.rb
formtastic-2.3.1 lib/formtastic/localized_string.rb
formtastic-2.3.0 lib/formtastic/localized_string.rb
formtastic-3.0.0.rc lib/formtastic/localized_string.rb
formtastic-2.3.0.rc4 lib/formtastic/localized_string.rb
formtastic-2.3.0.rc3 lib/formtastic/localized_string.rb
formtastic-2.3.0.rc2 lib/formtastic/localized_string.rb
formtastic-2.3.0.rc lib/formtastic/localized_string.rb
formtastic-2.2.1 lib/formtastic/localized_string.rb
formtastic-2.2.0 lib/formtastic/localized_string.rb
formtastic-2.2.0.rc lib/formtastic/localized_string.rb
formtastic-2.1.1 lib/formtastic/localized_string.rb
formtastic-2.1.0 lib/formtastic/localized_string.rb
formtastic-2.1.0.rc lib/formtastic/localized_string.rb
formtastic-2.1.0.beta1 lib/formtastic/localized_string.rb