Sha256: 977bd0fe289ef1863c500c3172f88ee8f21f9673f24ffedd19cbae769a023d1b

Contents?: true

Size: 572 Bytes

Versions: 15

Compression:

Stored size: 572 Bytes

Contents

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

	collection = field_collection(application, model, field, object)
	collection.insert(0, ['Todos',0])
	
	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

15 entries across 15 versions & 1 rubygems

Version Path
my_admin-0.1.4 app/views/my_admin/fields/filter/type/belongs_to.html.erb
my_admin-0.1.3 app/views/my_admin/fields/filter/type/belongs_to.html.erb
my_admin-0.1.2 app/views/my_admin/fields/filter/type/belongs_to.html.erb
my_admin-0.1.1 app/views/my_admin/fields/filter/type/belongs_to.html.erb
my_admin-0.0.12 app/views/my_admin/fields/filter/type/belongs_to.html.erb
my_admin-0.0.11 app/views/my_admin/fields/filter/type/belongs_to.html.erb
my_admin-0.0.10 app/views/my_admin/fields/filter/type/belongs_to.html.erb
my_admin-0.0.9 app/views/my_admin/fields/filter/type/belongs_to.html.erb
my_admin-0.0.8 app/views/my_admin/fields/filter/type/belongs_to.html.erb
my_admin-0.0.7 app/views/my_admin/fields/filter/type/belongs_to.html.erb
my_admin-0.0.6 app/views/my_admin/fields/filter/type/belongs_to.html.erb
my_admin-0.0.5 app/views/my_admin/fields/filter/type/belongs_to.html.erb
my_admin-0.0.4 app/views/my_admin/fields/filter/type/belongs_to.html.erb
my_admin-0.0.3 app/views/my_admin/fields/filter/type/belongs_to.html.erb
my_admin-0.0.2 app/views/my_admin/fields/filter/type/belongs_to.html.erb