Sha256: bbc47e68e7a039ddc37530b16463fe1c2f3527a56f99f7d6a1ce4fd1a380c5bc

Contents?: true

Size: 568 Bytes

Versions: 10

Compression:

Stored size: 568 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

10 entries across 10 versions & 1 rubygems

Version Path
my_admin-0.0.11 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.0.10 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.0.9 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.0.8 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.0.7 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.0.6 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.0.5 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.0.4 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.0.3 app/views/my_admin/fields/filter/type/list_string.html.erb
my_admin-0.0.2 app/views/my_admin/fields/filter/type/list_string.html.erb