Buen dia, como puedo enviar un objeto desde la vista al controlador como
parametro por ejemplo:
vista:
link_to_remote "Enviar Objeto", url=> {:controller => "algo", :action =>
"aqui"}, :with => "'objeto='+'#{objeto_a_enviar}'"
y este usarlo en el controlador?
on 2012-05-15 18:32
on 2012-05-30 10:56
Si te he entendido bien puedes hacerlo de la siguiente manera.
link_to_remote "Enviar Objeto", url=> {:controller => "algo", :action =>
"aqui", :id => @objeto_ejemplo}
Y luego en el controlador:
@objeto = (params[:id])
Suerte
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.