lass mal das <%= ... -%> um controller.controller_name weg; du bist
schon im Ruby Code

-Alex


2009/4/7 Dieter Scherthan <[email protected]>:
> Hallo zusammen,
>
> wie bekomme ich den Controllername in ein onchange-event einer
> collection_select eingebunden. Folgendes habe ich probiert, funktioniert
> aber nicht:
>
> <%= collection_select(:account, :account_id, Account.find(:all,
> :conditions => "typ_id = 10000"), :id, :matchcode,{},
> {:onchange => "document.location.href='/" + <%=
> controller.controller_name -%> + "/' +
> this.options[this.selectedIndex].value", :selected =>
> session[:account_id]})%>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rubyonrails-ug mailing list
> [email protected]
> http://mailman.headflash.com/listinfo/rubyonrails-ug
>
_______________________________________________
rubyonrails-ug mailing list
[email protected]
http://mailman.headflash.com/listinfo/rubyonrails-ug

Antwort per Email an