Sha256: 8136bb21c77ed9d8039d550f1dfc834d5aa13427a1b5ec9603cfd4ae2e549316
Contents?: true
Size: 1.05 KB
Versions: 24
Compression:
Stored size: 1.05 KB
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) start_blank = field_setting(model, field, :start_blank) start_blank = true if start_blank.nil? collection.insert(0, ['',0]) if start_blank 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