[Rails] select an existing item or create a new one

2010-04-07 Thread keavy
I have a form that manages a few models, using accepts_nested_attributes_for The new event form passes params like so: event={ name=, happenings_attributes={ 0={ location_attributes={ city=, country=, state= }, location_id=26} } }

[Rails] Re: select an existing item or create a new one

2010-04-07 Thread keavy
Thanks for your reply. Yeah I didn't think that was suitable in this case, with several fields, showing the user both options in the form etc. Anyway, I just figured out the issue... I was using resource_controller and was trying to delete the nested attributes (if not required) in a

[Rails] Re: Writing more advanced activerecord error messages

2010-01-29 Thread keavy
Why not just use validates_uniqueness_of, with a custom :message ? custom-err-msg is handy for custom messages: http://github.com/gumayunov/custom-err-msg I know that doesn't answer your URL issue, but it would seem a simpler/ tidier solution even if you still wanted to include the link. I