rubyonrailsin

A Ruby and Rails talk

Sunday, March 14, 2010


[Rails] Re: validates_presence_of :parent_id stopping save

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

Hi Anthony, thanks.

I'm not using the rails-supplied nested attributes methods here, though
maybe i should. I'm effectively hand-rolling my own, so i create a
question and some associated objects (eg a grading in this case) at the
same time, from a single form. When i drop the validation on
Grading#question_id then it works fine. I'm just a little puzzled about
the best way to go about validating question_id, since the default way
seems to stop me building a question and gradings at once.
--
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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive