AFAICT, this is all I need to do to get a simple example working: the <head> should have this: <%= javascript_include_tag :defaults %> My test page view should have a div with an id and the ERB like this: <%= link_to_remote ''Click Me'', :url => {:action => ''show_time'', :update => ''time_box''} %> <div id="time_box"></div> The controller for my test page should have this: def show_time layout false render_text "Time: " + DateTime.now.to_s end I know there''s various options for several of the details in there, but shouldn''t this example work as is? However, I get no response from this code. What am I missing? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Greg Willits wrote:> AFAICT, this is all I need to do to get a simple example working:> <%= link_to_remote ''Click Me'', > :url => {:action => ''show_time'', > :update => ''time_box''} %>ACK, found it -- the } was in the wrong spot. Now to get a view template to be used for the response. I thought one would just automatically get used, but apparently not? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Greg Willits wrote:> Greg Willits wrote: >> AFAICT, this is all I need to do to get a simple example working: > >> <%= link_to_remote ''Click Me'', >> :url => {:action => ''show_time'', >> :update => ''time_box''} %> > > ACK, found it -- the } was in the wrong spot. > > Now to get a view template to be used for the response. I thought one > would just automatically get used, but apparently not?Oi. sorry. ignore that. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Greg, Glad to see you got this working! I used to encounter the same types of things... weird errors that turned out to be obscure syntactic mistakes (like a wrongly placed or missing } in your example). In these cases, the API docs are indispensible.. to know when you need a hash or a hash of hashes, or stuff like that. -Danimal On Apr 13, 2:52 am, Greg Willits <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Greg Willits wrote: > > Greg Willits wrote: > >> AFAICT, this is all I need to do to get a simple example working: > > >> <%= link_to_remote ''Click Me'', > >> :url => {:action => ''show_time'', > >> :update => ''time_box''} %> > > > ACK, found it -- the } was in the wrong spot. > > > Now to get a view template to be used for the response. I thought one > > would just automatically get used, but apparently not? > > Oi. sorry. ignore that. > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---