search for: resourcenotfound

Displaying 2 results from an estimated 2 matches for "resourcenotfound".

2014 Apr 17
0
RestClient::ResourceNotFound in UsersController#index
Hi, I am trying to implement Rest Api for a sample application for learning purpose. But when I try to make a "GET" request through the RestClient it is showing error as RestClient::ResourceNotFound in UsersController#index def index uri = "#{API_BASE_URL}/users.json" # specifying json format in the URl rest_resource = RestClient::Resource.new(uri, USERNAME, PASSWORD) # It will create new rest-client resource so that we can call different methods of it users = rest_r...
2008 Oct 09
0
How to consume a nested singular resource?
...are generated: Blog.collection_path(:user_id => 1) => "/users/1/blogs.xml" Blog.element_path(1, :user_id => 1) => "/users/1/blogs/1.xml" On trying to create a blog for a specific user: b = Blog.new(:params => {:user_id => 1}) >> b.save ActiveResource::ResourceNotFound: Failed with 404 Not Found the client application gets a 404 because the generated url is incorrect and the REST API application throws an ActionController::UnknownAction exception because the generated route is routed to the wrong controller and action, in this case: /users/1/blogs.xml gets rou...