Displaying 1 result from an estimated 1 matches for "rails_conf".
Did you mean:
rails_config
2006 Jun 04
0
Bug: collection#create misbehaves on validations
...e a Presentation model which belongs to the Conference model.
We don''t want to create nameless Presentations, so we
class Presentation < ActiveRecord::Base
belongs_to :conference
validates_presence_of :name, :on => :create
end
Now we have a conference instance called rails_conf. When we try to
create a new nameless Presentation through the association collection:
rails_conf.presentations.create()
#=> #<Presentation:0x39c5678 @errors=#<ActiveRecord::Errors:0x39af868
@errors={"name"=>["can''t be blank"]}, @base=#<Presentation:0x39...