Nate Wiger
2007-Jan-17 23:50 UTC
AJAX GET requests returning "uninitialized constant Mime::RJS"
Hey all, I thought this was working until recently. I''m using link_to_remote: link_to_remote("More info", :url => user_path(user), :update => "show_#{user.id}", :method => :get) # NOTE: "GET" request This then updates a hidden div ("show_123" for example). My users_controller.rb is standard: def show @user = User.find(params[:id]) respond_to do |format| format.rjs format.html { raise "AJAX only for this method" } format.xml { render :xml => @user.to_xml } end end (The format.html catch is just for debugging for now) But it doesn''t get very far - the routing works but then all I get in my development.log is an error: uninitialized constant Mime::RJS The file show.rjs exists, and everything appears ok. Any ideas? As I said, I thought this was working until recently. Is the "GET" screwing RJS up? (because a "POST" doesn''t route correctly) Thanks, Nate --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Nate Wiger
2007-Jan-18 00:07 UTC
Re: AJAX GET requests returning "uninitialized constant Mime::RJS"
Crap, silly typo, should be "format.js" (NOT "format.rjs") Sorry for the bother... more coffee --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---