Public Instance methods
subform(association, opts={}, &block)
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
[show source]
# 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