J'aurai besoin de créer dynamiquement un path dans mon module. Mais je
n'arrive pas a comprendre comment faire.
Je voudrai faire cela ou trouver une autre façon de faire cela.
name_controller = action
edit_#{name_controller}_path(to_versioned.id)
Merci
on 2010-02-01 12:14
on 2010-02-01 12:20
Le 01/02/10 12:14, fougere a écrit : > J'aurai besoin de créer dynamiquement un path dans mon module. Mais je > n'arrive pas a comprendre comment faire. > > Je voudrai faire cela ou trouver une autre façon de faire cela. > > name_controller = action > edit_#{name_controller}_path(to_versioned.id) > http://ruby-doc.org/core/classes/Kernel.html#M005922 -- Cyril Mougel http://blog.shingara.fr/
on 2010-02-01 12:34
send( :"edit_#{name_controller}_path", to_versioned.id )
C
--
IciMarché fédère l'e-commerce de proximité
http://icimarche.fr
on 2010-02-01 12:38
Pardon, mon précédent mail est parti tout seul :-)
send( :"edit_#{action}_path", to_versioned.id )
Ca répond à ta question ?
N.B.
name_controller = action ?! n'y a-t-il pas une légère confusion entre
controller et action où bien c'est juste un nommage malheureux ?
--
IciMarché fédère l'e-commerce de proximité
http://icimarche.fr
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.