module Formtastic::LocalizedString

Public Instance Methods

model_name() click to toggle source
# File lib/formtastic/localized_string.rb, line 4
def model_name
  @object.present? ? @object.class.name : @object_name.to_s.classify
end

Protected Instance Methods

localized_string(key, value, type, options = {}) click to toggle source
# File lib/formtastic/localized_string.rb, line 10
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