Sha256: e2616058fd10782b7434bb1cb1ad16504c2d007516dd933d65baa18bbd93c3bb

Contents?: true

Size: 440 Bytes

Versions: 10

Compression:

Stored size: 440 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 = {}) # @private
      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

10 entries across 10 versions & 3 rubygems

Version Path
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/formtastic-4.0.0/lib/formtastic/localized_string.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/formtastic-4.0.0/lib/formtastic/localized_string.rb
formtastic-4.0.0 lib/formtastic/localized_string.rb
formtastic-4.0.0.rc1 lib/formtastic/localized_string.rb
formtastic-3.1.5 lib/formtastic/localized_string.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/formtastic-3.1.4/lib/formtastic/localized_string.rb
formtastic-3.1.4 lib/formtastic/localized_string.rb
formtastic-3.1.3 lib/formtastic/localized_string.rb
formtastic-3.1.2 lib/formtastic/localized_string.rb
formtastic-3.1.1 lib/formtastic/localized_string.rb