module Sequel::Plugins::FormeI18n::SequelFormI18n
Public Instance Methods
subform(association, opts={}, &block)
click to toggle source
Checks if there’s a translation for the ‘models.<table_name>.<association>’ key and merge it to the options with the :legend key
Calls the original Sequel::Plugins::Forme::SequelForm
method
Calls superclass method
# File lib/sequel/plugins/forme_i18n.rb 16 def subform(association, opts={}, &block) 17 i18n_key = "models.#{obj.class.table_name}.#{association}" 18 19 if opts[:legend].nil? && I18n.exists?(i18n_key) 20 opts[:legend] = I18n.t(i18n_key) 21 end 22 23 super 24 end