Hi, I am new to rails, and I was struggling on getting this code to work on rails 3.0.4 and I found out that I need to use the link_to thing but I am unsure on how to write it for the code below: <div id="seats"> <%= render :partial=>"seat_list", :locals=>{:seats=>@flight.seats } %> </div> <%= link_to_remote( "Refresh seats", :url=>"/flights/#{@flight.id}/seats", :method=>"get", :update=>"seats") %> what can I DOOOOOO????? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Start by describing the problem. You need to explain what you''re trying to do and what''s not working. On Sun, Feb 20, 2011 at 1:47 AM, Poojan <poojanshah2005-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I am new to rails, and I was struggling on getting this code to work > on rails 3.0.4 and I found out that I need to use the link_to thing > but I am unsure on how to write it for the code below: > > <div id="seats"> > <%= render :partial=>"seat_list", :locals=>{:seats=>@flight.seats } %> > </div> > <%= link_to_remote( > "Refresh seats", > :url=>"/flights/#{@flight.id}/seats", > :method=>"get", > :update=>"seats") %> > > what can I DOOOOOO????? > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I am trying to make a refresh button that would reload a partial _seat_list.html.erd in ajax and I am trying to write it so that it works for rails 3. I am also getting this error "undefined method `link_to_remote'' for #<#<Class:0x2ca4218>:0x2ca2fb8>", which I have learned is not now a method in rails 3 and am struggling to write it as a link_to On Feb 20, 7:56 am, Chris Kottom <ch...-kMviOf/NVQxZWXO/OqhO/A@public.gmane.org> wrote:> Start by describing the problem. You need to explain what you''re trying to > do and what''s not working. > > > > > > > > On Sun, Feb 20, 2011 at 1:47 AM, Poojan <poojanshah2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi, > > > I am new to rails, and I was struggling on getting this code to work > > on rails 3.0.4 and I found out that I need to use the link_to thing > > but I am unsure on how to write it for the code below: > > > <div id="seats"> > > <%= render :partial=>"seat_list", :locals=>{:seats=>@flight.seats } %> > > </div> > > <%= link_to_remote( > > "Refresh seats", > > :url=>"/flights...-nFsM2Lh371NgoHlPtYpdqQ@public.gmane.org}/seats", > > :method=>"get", > > :update=>"seats") %> > > > what can I DOOOOOO????? > > > -- > > You received this message because you are subscribed to the Google Groups > > "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
That method and other similar functions were extracted to the Prototype Legacy Helper plugin in Rails 3. The replacement method name is remote_function, though the usage is a little different. See http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html#method-i-remote_function . Check out at https://github.com/rails/prototype_legacy_helper if you want to use the old syntax, though I expect that best practice is to use the functionality bundled in the current release. On Sun, Feb 20, 2011 at 11:58 AM, Poojan <poojanshah2005-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am trying to make a refresh button that would reload a partial > _seat_list.html.erd in ajax and I am trying to write it so that it > works for rails 3. I am also getting this error "undefined method > `link_to_remote'' for #<#<Class:0x2ca4218>:0x2ca2fb8>", which I have > learned is not now a method in rails 3 and am struggling to write it > as a link_to > > On Feb 20, 7:56 am, Chris Kottom <ch...-kMviOf/NVQxZWXO/OqhO/A@public.gmane.org> wrote: > > Start by describing the problem. You need to explain what you''re trying > to > > do and what''s not working. > > > > > > > > > > > > > > > > On Sun, Feb 20, 2011 at 1:47 AM, Poojan <poojanshah2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > Hi, > > > > > I am new to rails, and I was struggling on getting this code to work > > > on rails 3.0.4 and I found out that I need to use the link_to thing > > > but I am unsure on how to write it for the code below: > > > > > <div id="seats"> > > > <%= render :partial=>"seat_list", :locals=>{:seats=>@flight.seats } %> > > > </div> > > > <%= link_to_remote( > > > "Refresh seats", > > > :url=>"/flights...-nFsM2Lh371NgoHlPtYpdqQ@public.gmane.org}/seats", > > > :method=>"get", > > > :update=>"seats") %> > > > > > what can I DOOOOOO????? > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "Ruby on Rails: Talk" group. > > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > . > > > To unsubscribe from this group, send email to > > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > For more options, visit this group at > > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.