Tuesday, October 2, 2012

[Rails] Re: New To Rails

I have now ran into another issue.

I have a field like this on my _form.html page:

<%= f.collection_select :address_region, Admin::Region.order(:region),
:id, :region, :include_blank => true %>

This works fine, but if I don't select a value (which is okay) I can not
later edit the record. If I try to, I get:

Couldn't find Admin::Region without an ID

Is there anyway to edit the form if users have left the field blank?

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate