Non model question in a model form

8 views
Skip to first unread message

Asa Romberger

unread,
May 29, 2014, 12:56:44 PM5/29/14
to rubyonra...@googlegroups.com
I am working on a Rails app where people sign up and have a profile. When they are first signing up, they fill in their profile but I have an additional question when they are creating their account that alters the initial configuration of the account but is never used afterwards, so I don't want to include it in the profile. It is a multiple choice question with certain validation rules. How do I go about including this in the form?

Walter Lee Davis

unread,
May 29, 2014, 1:43:13 PM5/29/14
to rubyonra...@googlegroups.com

On May 29, 2014, at 12:56 PM, Asa Romberger wrote:

> I am working on a Rails app where people sign up and have a profile. When they are first signing up, they fill in their profile but I have an additional question when they are creating their account that alters the initial configuration of the account but is never used afterwards, so I don't want to include it in the profile. It is a multiple choice question with certain validation rules. How do I go about including this in the form?

How serious do these validations need to be? You may be able to do all of this in the view, using JavaScript for validation. As long as the result of the choice being made here is backed up by actual validations on your model, you should be fine.

Walter

>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/10ef46b7-c3b1-4e3d-b821-785e7967b12c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages