On 7 February 2011 14:51, Kelly Pfaff <[email protected]> wrote: > Frederick Cheung wrote in post #980057: > >> >> You haven't shown anywhere where you're trying to set it - if you want >> it to be set based on a parameter, you're going to have to set @grp to >> params[:something] >> > > Hm, i forgot the on_click in my code: > <%= link_to image_tag("oranje.png", :mouseover => > image_path("oranje2.png"), :onclick => (:grp => 'o')), zwemmers_path %> > > So when i click the image i want to redirect to zwemmers_path and i want > to change the value of @grp to 'o'. I don't know how to implement params > tho.
If you don't know about passing data back to the controller via params then you need to run through some basic guides and tutorials. See the Rails Guides (google it) and railstutorial.org is good. Make sure that any tutorial you use matches the rails version you are using (2 or 3). I would advise using Rails 3 unless you are to maintain legacy apps. Colin -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

