On update ( in form fields, updated label, same description )
params
{“event”=>{“place_attributes”=>{“label”=>“a very beautiful place”,
“description”=>“where you should go…”}}
@event.errors debugging
@messages={:“place.description”=>[“has already been taken”]}> !!
uniqueness should not be checked
On update ( in form fields, updated label, same description )
params
{“event”=>{“place_attributes”=>{“label”=>“a very beautiful place”,
“description”=>“where you should go…”}}
@event.errors debugging
@messages={:“place.description”=>[“has already been taken”]}> !!
uniqueness should not be checked
I don’t understand what is happening that is not as you expect.
Please try and explain in more detail.
the[SOLVED] I thought uniqueness of :description was checked on record
update even with :on => :create condition for validate…
it was , but my functional test was not an update …
I was using
post :update, :locale => I18n.locale, :id => @event_0[:id]
it MUST be
put :update, :locale => I18n.locale, :id => @event_0[:id]
Le mardi 4 dcembre 2012 11:12:00 UTC+1, Colin L. a crit :
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.