Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Routing error in rails
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ruby rails  
View profile  
 More options Oct 26 2012, 4:05 am
From: ruby rails <li...@ruby-forum.com>
Date: Fri, 26 Oct 2012 10:04:53 +0200
Local: Fri, Oct 26 2012 4:04 am
Subject: Routing error in rails
In my controller I have

  def update_project_dates
       p "It is end date....."
      @user=User.find(params[:user])
       @projects=Project.find_all_by_user_id(@user)

   end

In the view page (only some part of the code is copied and pasted)

 eventDrop: function()
             {
               $.ajax({
                 url:'/update_project_dates/',
                 success:function(data)
                 {
                 alert("Hello");
                 }
               })
             },

In my routes.rb I have mentioned

 match
 '/update_project_dates'=>'users#update_project_dates',:method=>:get
 get 'update_project_dates'

But When the ajax request goes, I get the routing error as
<h1>Routing Error</h1>
<p><pre>uninitialized constant UsersController</pre></p>

Where am I doing wrong here...Please help..

--
Posted via http://www.ruby-forum.com/.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.