Module: Wicked::Wizard::Translated

Extended by:
ActiveSupport::Concern
Defined in:
lib/wicked/wizard/translated.rb

Instance Method Summary collapse

Instance Method Details

#wizard_translationsObject

creates a hash where keys are translated steps, values are the name of the view file => “first”, :second => “second” => “first”, :dos => “second”



16
17
18
19
20
21
22
23
# File 'lib/wicked/wizard/translated.rb', line 16

def wizard_translations
  @wizard_translations ||= steps.inject(ActiveSupport::OrderedHash.new) do |hash, step|
    step        = step.to_s.split(".").last
    translation = I18n.t("wicked.#{step}").to_sym
    hash[translation] = step.to_sym
    hash
  end
end