Sha256: 94e1fb833b81c342dfa4f716bb656910fa831460f21ff31417d3fccba78da6bd
Contents?: true
Size: 537 Bytes
Versions: 25
Compression:
Stored size: 537 Bytes
Contents
class AdminRelationshipSelectInput < SimpleForm::Inputs::CollectionSelectInput def input super @builder.collection_select( "#{attribute_name}_id", @builder.object.class.name.constantize.reflect_on_association(attribute_name.to_sym).klass.name.constantize.list_for_select, :first, :last, prompt: I18n.t("#{@builder.object.class.to_s.gsub(/^.*::/, '').downcase}.lista_#{attribute_name}.selecione", default: I18n.t("messages.select")), input_html: {:class=> 'chosen'} ) end end
Version data entries
25 entries across 25 versions & 1 rubygems