Zhao Lu
2008-Oct-27 23:54 UTC
[Facebooker-talk] link_to_remote with :method => :get inside of facebook
I''m using link_to_remote with method set to get to invoke the index method in my controller: <%= link_to_remote(gc.category, :url => gifts_url({:canvas => false, :action => "index", :type => ''ImageGift'', :category => gc.category, :format => ''fbml''}), :method => :get, :success => ''update_images(request)'') %> When requesting from facebook, the :method => :get is not respected and the controller tries to process :POST and invokes create method. I took a look at the http headers, which has "REQUEST_METHOD"=>"POST". I''m not sure if doing a get request is entirely not possible from inside of fb or if I''m missing something. Any suggestion is appreciated. -- Zhao
Jonathan Otto
2008-Oct-29 16:13 UTC
[Facebooker-talk] link_to_remote with :method => :get inside of facebook
use :_method => :get instead note the underscore On Mon, Oct 27, 2008 at 6:54 PM, Zhao Lu <zhao.lu.us at gmail.com> wrote:> I''m using link_to_remote with method set to get to invoke the index > method in my controller: > <%= link_to_remote(gc.category, > :url => gifts_url({:canvas => false, :action => "index", > :type => ''ImageGift'', :category => gc.category, :format => ''fbml''}), > :method => :get, :success => ''update_images(request)'') %> > > When requesting from facebook, the :method => :get is not respected > and the controller tries to process :POST and invokes create method. > I took a look at the http headers, which has "REQUEST_METHOD"=>"POST". > > I''m not sure if doing a get request is entirely not possible from > inside of fb or if I''m missing something. > > Any suggestion is appreciated. > > -- > Zhao > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk >
Zhao Lu
2008-Oct-29 17:22 UTC
[Facebooker-talk] link_to_remote with :method => :get inside of facebook
That was it, Thanks Jonathan! On Wed, Oct 29, 2008 at 9:13 AM, Jonathan Otto <jonathan.otto at gmail.com> wrote:> use :_method => :get instead > > note the underscore > > On Mon, Oct 27, 2008 at 6:54 PM, Zhao Lu <zhao.lu.us at gmail.com> wrote: >> I''m using link_to_remote with method set to get to invoke the index >> method in my controller: >> <%= link_to_remote(gc.category, >> :url => gifts_url({:canvas => false, :action => "index", >> :type => ''ImageGift'', :category => gc.category, :format => ''fbml''}), >> :method => :get, :success => ''update_images(request)'') %> >> >> When requesting from facebook, the :method => :get is not respected >> and the controller tries to process :POST and invokes create method. >> I took a look at the http headers, which has "REQUEST_METHOD"=>"POST". >> >> I''m not sure if doing a get request is entirely not possible from >> inside of fb or if I''m missing something. >> >> Any suggestion is appreciated. >> >> -- >> Zhao >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >-- Zhao