[Ror-es] Rails, JavaScript y Objeto Session

Jorge Bernal jbernal at warp.es
Tue Nov 28 12:02:05 GMT 2006


El 28/11/2006, a las 12:21, DaVinci escribió:

> El martes 28 de noviembre, Jorge Bernal escribió:
>> No se puede acceder a la sesion desde JS, ya que esos datos se
>> manejan del lado del servidor. Puedes enviarselo al controlador con
>> una peticion AJAX y guardarlo desde ahi
>
>  Mis últimas indagaciones ya apuntaban a una solución de ese tipo.
>  ¿Podrías darme alguna referencia donde pueda ver cómo enviar datos
>  mediente AJAX?
>
Puedes usar el helper remote_function
http://api.rubyonrails.com/classes/ActionView/Helpers/ 
PrototypeHelper.html#M000420

O si prefieres hablar en JS directamente:
http://www.sergiopereira.com/articles/prototype.js.html#UsingAjaxRequest

>  Muchas gracias por tu ayuda.
>
>  							David
>
> _______________________________________________
> Ror-es mailing list
> Ror-es at lists.simplelogica.net
> http://lists.simplelogica.net/mailman/listinfo/ror-es

--
Jorge Bernal Ordovás  <jbernal at warp.es>
http://amedias.org/ [ES]
http://koke.amedias.org/ [EN]

Warp Networks         http://www.warp.es/
María de Luna 11, 50018 Zaragoza, España


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1940 bytes
Desc: not available
Url : http://lists.simplelogica.net/pipermail/ror-es/attachments/20061128/c164125f/attachment.bin 


More information about the Ror-es mailing list