Hey fellas, I am trying to put together a small app to help my university accept applications for one of its summer programs. Currently, they send you an application, you print it, you fill it, scan it, then send it back! We can''t tolerate this in a world of Rails. Anyway, so the giant form has personal information section, language information section (The biggest part, about a page and a half, this checks your current level of Arabic), and a track information section that presents you all tracks and their fees and schedules for you to choose from. I am putting each section into its own step so the form will navigate three steps. Now, my question is, wouldnt it make more sense to break these into different models? One "application" model will be too big. For some reason I can''t reason about how to do this. What would the other models be? Does it make sense to have a "language information" model that belongs to some student''s application? Thanks for your help. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/8tf3VBJS5kwJ. For more options, visit https://groups.google.com/groups/opt_out.
Hey folks, Nobody faced this issue before? I am surprised. Or was my description not very clear? In any case I am doing the entire thing in one model then see how it works out. On Thu, Dec 20, 2012 at 11:49 AM, why-el <wael.khobalatte-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hey fellas, > > I am trying to put together a small app to help my university accept > applications for one of its summer programs. Currently, they send you an > application, you print it, you fill it, scan it, then send it back! We > can''t tolerate this in a world of Rails. > > Anyway, so the giant form has personal information section, language > information section (The biggest part, about a page and a half, this checks > your current level of Arabic), and a track information section that > presents you all tracks and their fees and schedules for you to choose > from. I am putting each section into its own step so the form will navigate > three steps. > > Now, my question is, wouldnt it make more sense to break these into > different models? One "application" model will be too big. For some reason > I can''t reason about how to do this. What would the other models be? Does > it make sense to have a "language information" model that belongs to some > student''s application? > > Thanks for your help. > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-talk/-/8tf3VBJS5kwJ. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- Mohamed Wael Khobalatte -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Hey, you can simply create new actions and put forms there. If you have steps like Personal, School you could just set the attributes of personal in the personal form and on the next page you just set the attributes of School. but i guess you mean wizarding a controller - check this out: https://github.com/schneems/wicked http://railscasts.com/episodes/346-wizard-forms-with-wicked Greetings, Crispin Am Freitag, 21. Dezember 2012 16:01:06 UTC+1 schrieb why-el:> > Hey folks, > > Nobody faced this issue before? I am surprised. Or was my description not > very clear? In any case I am doing the entire thing in one model then see > how it works out. > > On Thu, Dec 20, 2012 at 11:49 AM, why-el <wael.kh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org<javascript:> > > wrote: > >> Hey fellas, >> >> I am trying to put together a small app to help my university accept >> applications for one of its summer programs. Currently, they send you an >> application, you print it, you fill it, scan it, then send it back! We >> can''t tolerate this in a world of Rails. >> >> Anyway, so the giant form has personal information section, language >> information section (The biggest part, about a page and a half, this checks >> your current level of Arabic), and a track information section that >> presents you all tracks and their fees and schedules for you to choose >> from. I am putting each section into its own step so the form will navigate >> three steps. >> >> Now, my question is, wouldnt it make more sense to break these into >> different models? One "application" model will be too big. For some reason >> I can''t reason about how to do this. What would the other models be? Does >> it make sense to have a "language information" model that belongs to some >> student''s application? >> >> Thanks for your help. >> >> -- >> 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 rubyonra...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<javascript:> >> . >> To unsubscribe from this group, send email to >> rubyonrails-ta...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/rubyonrails-talk/-/8tf3VBJS5kwJ. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > > -- > Mohamed Wael Khobalatte > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/67FjiqLU1csJ. For more options, visit https://groups.google.com/groups/opt_out.
On Thu, Dec 20, 2012 at 5:49 AM, why-el <wael.khobalatte-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Anyway, so the giant form has personal information section, language > information section (The biggest part, about a page and a half, this checks > your current level of Arabic), and a track information section that presents > you all tracks and their fees and schedules for you to choose from. I am > putting each section into its own step so the form will navigate three > steps. > > Now, my question is, wouldnt it make more sense to break these into > different models? One "application" model will be too big. For some reason I > can''t reason about how to do this. What would the other models be? Does it > make sense to have a "language information" model that belongs to some > student''s application?Generally speaking, Models would correspond to how you would use the information collected. You might wish to look at generalizing this application a bit. so, there might be an "Applicant" model, a "Language Fluency" model, which might be composed of language "Questions", a "Fluency Test" and "Answers" models, and then there seems to be a "Track" model. Applicant might be: -- Name(s) -- Address -- phone -- email ... etc has_one: Track has_one: Fluency Test Language Fluency might be: -- has_many: Questions Questions might be: -- belongs_to Lanugage Fluency -- question text Fluency Test might be: -- belongs_to: Applicant -- has_many: Answers -- date completed -- ... Answers might be: -- belongs_to: Fluency Test -- answer text -- score /* ? */ Track might be: -- title -- fee -- schedule /* (?) (not sure what you meant by schedule) */ anyway, that''s the sort of way I''d approach it. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Hey! That''s actually a great answer, and thats I what I generally started doing. I looked at all the info I have and asked myself: "Which of these sets of information would an admin want to manage?". From there for instance I thought about making a track model so that admins can easily add/delete as many tracks as they want, and so on. I did however put applicant as belonging to a track and not has one. This has always confused me. Any idea why you want with a has_one relationship there? On Sat, Dec 22, 2012 at 1:52 PM, tamouse mailing lists < tamouse.lists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Thu, Dec 20, 2012 at 5:49 AM, why-el <wael.khobalatte-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Anyway, so the giant form has personal information section, language > > information section (The biggest part, about a page and a half, this > checks > > your current level of Arabic), and a track information section that > presents > > you all tracks and their fees and schedules for you to choose from. I am > > putting each section into its own step so the form will navigate three > > steps. > > > > Now, my question is, wouldnt it make more sense to break these into > > different models? One "application" model will be too big. For some > reason I > > can''t reason about how to do this. What would the other models be? Does > it > > make sense to have a "language information" model that belongs to some > > student''s application? > > Generally speaking, Models would correspond to how you would use the > information collected. You might wish to look at generalizing this > application a bit. > > so, there might be an "Applicant" model, a "Language Fluency" model, > which might be composed of language "Questions", a "Fluency Test" and > "Answers" models, and then there seems to be a "Track" model. > > Applicant might be: > -- Name(s) > -- Address > -- phone > -- email > ... etc > > has_one: Track > has_one: Fluency Test > > Language Fluency might be: > -- has_many: Questions > > Questions might be: > -- belongs_to Lanugage Fluency > -- question text > > Fluency Test might be: > -- belongs_to: Applicant > -- has_many: Answers > -- date completed > -- ... > > Answers might be: > -- belongs_to: Fluency Test > -- answer text > -- score /* ? */ > > Track might be: > -- title > -- fee > -- schedule /* (?) (not sure what you meant by schedule) */ > > anyway, that''s the sort of way I''d approach it. > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- Mohamed Wael Khobalatte -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On Sat, Dec 22, 2012 at 1:56 PM, Mohamed Wael Khobalatte <wael.khobalatte-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hey! > > That''s actually a great answer, and thats I what I generally started doing. > I looked at all the info I have and asked myself: "Which of these sets of > information would an admin want to manage?". From there for instance I > thought about making a track model so that admins can easily add/delete as > many tracks as they want, and so on. > > I did however put applicant as belonging to a track and not has one. This > has always confused me. Any idea why you want with a has_one relationship > there?(Bottom posting...)> On Sat, Dec 22, 2012 at 1:52 PM, tamouse mailing lists > <tamouse.lists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> On Thu, Dec 20, 2012 at 5:49 AM, why-el <wael.khobalatte-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > Anyway, so the giant form has personal information section, language >> > information section (The biggest part, about a page and a half, this >> > checks >> > your current level of Arabic), and a track information section that >> > presents >> > you all tracks and their fees and schedules for you to choose from. I am >> > putting each section into its own step so the form will navigate three >> > steps. >> > >> > Now, my question is, wouldnt it make more sense to break these into >> > different models? One "application" model will be too big. For some >> > reason I >> > can''t reason about how to do this. What would the other models be? Does >> > it >> > make sense to have a "language information" model that belongs to some >> > student''s application? >> >> Generally speaking, Models would correspond to how you would use the >> information collected. You might wish to look at generalizing this >> application a bit. >> >> so, there might be an "Applicant" model, a "Language Fluency" model, >> which might be composed of language "Questions", a "Fluency Test" and >> "Answers" models, and then there seems to be a "Track" model. >> >> Applicant might be: >> -- Name(s) >> -- Address >> -- phone >> -- email >> ... etc >> >> has_one: Track >> has_one: Fluency Test >> >> Language Fluency might be: >> -- has_many: Questions >> >> Questions might be: >> -- belongs_to Lanugage Fluency >> -- question text >> >> Fluency Test might be: >> -- belongs_to: Applicant >> -- has_many: Answers >> -- date completed >> -- ... >> >> Answers might be: >> -- belongs_to: Fluency Test >> -- answer text >> -- score /* ? */ >> >> Track might be: >> -- title >> -- fee >> -- schedule /* (?) (not sure what you meant by schedule) */ >> >> anyway, that''s the sort of way I''d approach it.On Sat, Dec 22, 2012 at 1:56 PM, Mohamed Wael Khobalatte <wael.khobalatte-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I did however put applicant as belonging to a track and not has one. This > has always confused me. Any idea why you want with a has_one relationship > there?Not really understanding your application, and therefore your models, I just made a guess. It could be possible that you want this to go the other way, sure, depending on your needs and how you want to manage things. If Tracks have many Applicants, and an Applicant belongs to a Track, then yes, reverse the sense of the relationship. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.