Thanks for the idea but what if both classes have different fields and validations and permitions ? How do I declare that in the fields part of hobo and lifecycle etc.?
On Sep 30, 4:14 pm, Joachim Filip Bartosik <[email protected]> wrote: > W dniu 30.09.2011 15:09, Scorpio pisze: > > > I need to create 2 classes of users with a different signup page. I > > got my regular user model up and running but i need there to be a "I'm > > a <class1>" "I'm a <class2>" link when one clicks signup and each form > > to be under the mentioned links instead of the root/signup > > > Is it a matter of lifecycle just saying create: signup_user1 and > > create: signup_user2 or something like that ? > > Thanks in advance > > Hello, > I think the easiest way to do what you want is: > > 1. Use one User model. > 2. Add a boolean field belongs_to_class_one to User model. > 3. Create a static page for choosing role. Use something like > > <form with="&User.new(:is_class_one => true)"> > <input type="hidden" name="User[is_class_one]" value="&true" /> > <submit label="I'm <class 1>"> > </form> > > 4. Customize form for user, like > > <def tag="form" for="User"> > <if test="&this.is_class_one"> > Form for users in class 1 > </if> > <else> > Form for users in class 2 > </else> > </def> > > Cheers, > Joachim -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
