Sha256: 2f6654dda608104f6d9cc02cce0104c0df9f1411a818098eb074ccce28319879

Contents?: true

Size: 572 Bytes

Versions: 14

Compression:

Stored size: 572 Bytes

Contents

<%
  field_name = "#{field.to_s.singularize}"
  field_id = "#{model.underscore}_#{field_name}"

	collection = field_collection(application, model, field, object)
	collection.insert(0, ['Todos', ''])
	
	collection_selected = params[model.underscore][field_name] if params[model.underscore].present? and params[model.underscore][field_name].present?
	#collection_selected = object.send(field.to_s.singularize).id unless object.send(field.to_s.singularize).blank?
%>
<%= select_tag "#{model.underscore}[#{field_name}]", options_for_select(collection, collection_selected) %>

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
my_admin-0.1.13 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.1.12 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.1.11 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.1.10 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.1.9 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.1.8 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.1.7 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.1.6 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.1.5 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.1.4 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.1.3 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.1.2 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.1.1 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.0.12 app/views/my_admin/fields/filter/type/list_string.html.erb