[Rails] Re: Dynamic select box

2009-02-18 Thread pepe
I would do 2 things to try to fix your problem if I were you: 1. Make sure you know the type of user you have when you get the request for the page 2. Put the logic of generating the data in the controller, then use an instance variable to display the values and forget the 'if then else' logic in

[Rails] Re: Dynamic select box

2009-02-17 Thread Guillaume Loader
Rob Biedenharn wrote: > On Feb 17, 2009, at 5:52 PM, Guillaume Loader wrote: > >> <% > <%= >^ > if you want output, you generally need <%= (if you get to the point > that you know to generate output from <% %>, then you will KNOW when > to use them) > > -Rob I did this : <% if(current

[Rails] Re: Dynamic select box

2009-02-17 Thread Rob Biedenharn
On Feb 17, 2009, at 5:52 PM, Guillaume Loader wrote: > > Hi everyone, > > I have a problem. I want to display a different select box wether the > current user is an admin or an user. > > So I thought I could do this in my view where my form is displayed : > > ><%= f.label(:role_id, 'Role:'

[Rails] Re: Dynamic Select Box

2008-09-22 Thread Rodrigo Fuentealba
2008/9/23 Jaikishan Jalan <[EMAIL PROTECTED]>: > I have two select boxes and I update the content of second box on the basis > of selection made on first with AJAX. I was wondering if any one can point > to related tutorial. > Search by observe_field, AFAIK. -- Rodrigo Fuentealba http://www.the