search for: urlgenerationerror

Displaying 3 results from an estimated 3 matches for "urlgenerationerror".

2014 Mar 31
0
Rails Engine ActionController::UrlGenerationError on functional tests
Hi, I'm looking for a way to solve an error I get each times I run my functional tests. I have a Rails Engine gem (isolated), I have a JSON action with a route declared. But each times I use the method get in a test I get an ActionController::UrlGenerationError exception. Here an example of code with the problem: # config/routes.rbMyEngine::Engine.routes.draw do resources :cats, only: [:show], format: 'json'end # test/dummy/config/routes.rbRails.application.routes.draw do mount MyEngine::Engine => '/my_engine'end # app/controllers...
2014 May 16
0
(Beginner) ActionController::UrlGenerationError - No route matches
...ase you are interested in: It's http://guides.rubyonrails.org/getting_started.html), and I'm stuck on the following: I create in some erb file a link using <%= link_to 'Add new weird stuff', controller: new_article_path %> and this raises the exception ActionController::UrlGenerationError in Articles#index No route matches {:action=>"index", :controller=>"articles/new"} The helper new_article_path returns 'articles/new'. My routes are these: welcome_index GET /welcome/index(.:format) welcome#index articles GET /articles(.:format)...
2014 Jun 09
0
How can I test my controller via rspec for something other than response.should be_success?
...cess response on post create" do post :create, params response.should be_success end however, for a nested resource like 'comment' which is nested under post... the above would throw the following... Failure/Error: post :create, params ActionController::UrlGenerationError: No route matches and if I tried it "should get a success response on post create" do post :create, post_id: @post.id, params #@post is defined and created above response.should be_success end I get this odd error... syntax error, unexpected...