samson78 wrote:
> Well, I am not even sure if the title is correct. Anyway, here is my
> problem:
> I have an AS named hotels. It has a "has_and_belongs_many relation
> with Areas. And Areas belongs_to Categories, (areas have category_id
> as foreign key).
> Now, I want to be able when I click edit on a hotel to be able to view
> under the Areas portion of the update form the following:
> 1)Category ID 1 (a label, not a field) ---- dropdown menu with all
> areas in category ID 1
> 2)Category ID 2 ---- dropdown menu with all areas in category ID 2
> 3)Category ID 3 ---- dropdown menu with all areas in category ID 3
>
> And when I hit update, Hotel will be updated with all three areas.
>
> I have reach only up to the point that I have to use a
> _areas_form_column.html.erb to override the defaults. But could
> someone please tell me what to actually put in the file?
>
> Thanks in advance,
>   

Stop thinking that AS is some kind of magic - it's just scaffolding for 
creating a form.  *YOU* have to write the form though if you want any 
kind of magic in it

In this case you want the form to change in response to you clicking 
some parts of it.  This is going to require some javascript.  First make 
the form work the way you want it by creating it manually and then when 
you have the form the way you want it, go back to AS and use the form 
override to end up with the same code

Good luck!

Ed W

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to