Routing error in rails

13 views
Skip to first unread message

ruby rails

unread,
Oct 26, 2012, 4:04:53 AM10/26/12
to rubyonra...@googlegroups.com
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/.
Reply all
Reply to author
Forward
0 new messages