Is there some way to have a ‘virtual object’ ? For example there is a “Reservation” model that has a field vehicle_location that belongs_to a Location model. I also want to include an option within collection_select for “No Vehicle”. If a Location is chosen I want to validate it, if No Vehicle is chosen I want to let the model proceed with creation… But just have one select list instead of a separate virtual attribute check box for ‘No
ok well figured out a way it may not be right but it works - to create a real object with a special attribute to make it ‘inactive’ so it doesn’t appear with other options - there must be a better way
With a multi-step form - after visitors complete it, to prevent them from going back and editing the form. Is the standard best practice to just keep the record ID in the session and delete it at the end once the form is complete? Or is there a better way? There is no login involved for this record creation.
Generally you define steps in a controller, first step it creates a model, next steps add more data to the model. Validation is setup to be conditional based on the current step, and then payment occurrs as a validation on last step.