Szczepan Faber
2006-Jan-17 20:20 UTC
[Rails] link_to_remote() - can I post data with it???
can I post data with link_to_remote(), link_to() has special option :post => true and viola Thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060117/2a0a00af/attachment.html
You can serialize form elements by adding the :with => "Form.serialize(
''form_id'' )" attribute to your link_to_remote tag.
I''m sure there''s a way
of serializing additional data, but I''m not sure what it is. You can
specify additional attributes in the :url => { :action => <blah> }
section,
but I''m a total newb and am not sure if those are sent via GET or POST
(I am
guessing they are sent via GET since they are associated with the URL
attribute).
-Will
On 1/17/06, Szczepan Faber <szczepiq@gmail.com>
wrote:>
> can I post data with link_to_remote(),
>
> link_to() has special option :post => true and viola
>
> Thanks in advance
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060117/c5367a75/attachment.html
Sam Stephenson
2006-Jan-17 21:01 UTC
[Rails] link_to_remote() - can I post data with it???
Hi, On 1/17/06, Szczepan Faber <szczepiq@gmail.com> wrote:> can I post data with link_to_remote(), > > link_to() has special option :post => true and violalink_to_remote makes a POST request by default. If you want a GET request, just specify :method => :get. -- sam