Sha256: 8b6a82587102cdaaa7a86e60912f7ea98c70439ea985a2dbdcee2d58b54d5739
Contents?: true
Size: 954 Bytes
Versions: 24
Compression:
Stored size: 954 Bytes
Contents
<% remote = field_setting(model, field, :remote) unless remote.blank? field_remote_name = remote[:field] fk = remote[:fk] || field.to_s onchange = "updateFieldRemote('#{model_link(application, model)}', '#{model.underscore}', '#{fk}', '#{field_remote_name}', $('##{field.to_s}').val())" end onchangesettings = field_setting(model, field, :onchange) onchange = onchangesettings unless onchangesettings.blank? collection = field_collection(application, model, field, object) collection.insert(0, ['']) collection_selected = object.send(field.to_s) klass = field_setting(model, field, :class) || "input-xlarge" %> <%= form.select field, options_for_select(collection, collection_selected), {}, { :onchange => onchange, :class => "select2-me #{klass}", "data-placeholder" => "Selecione" } %> <%#= select_tag "#{model.underscore}[#{field.to_s}]", options_for_select(collection, collection_selected), { :onchange => onchange } %>
Version data entries
24 entries across 24 versions & 1 rubygems