RailsCasts Pro episodes are now free!

Learn more or hide this

Andy Lin's Profile

GitHub User: ultramaroon

Comments by Andy Lin

Avatar

It doens't have an index action; but it shouldn't have one. Not conceptually, and not according to Ryan's code. Even when I copy/paste his code, it gets the error. (Only in testing, not when I click it manually on the web). Maybe it's a bug in Rspec/Capybara?

Avatar

Hi,

I am a newbie to Rails/web programming, and am following along with your railscasts, which have been an awesome resource. However, I have come across a problem I can't seem to fix here, despite following the railscast. I get this error when running the test:

 Failure/Error: click_button "Reset Password"
 AbstractController::ActionNotFound:
   The action 'index' could not be found for PasswordResetsController
 # (eval):2:in `click_button'
 # ./spec/requests/password_resets_spec.rb:9:in `block (2 levels) in <top (required)>'

This, despite the fact that the create controller redirects to root_url, and when i do it through the browser, it works just fine. However, the test keeps wanting to route itself to the index action.

Anyone else get this error? Any ideas?