I’m converting an application and adding specs so I have created a new Rails 3 app and am writing specs and migrating code over from the old app to the new as needed to get things to pass…
But I’m having a strange problem with routes – any routes that I specify with ‘resource’ or ‘resources’ vanish. Rake routes has nothing for them and tests fail. For example:
resources :accounts, :only => [':get, :post] resources :assets, only: [:index]
result in no output from rake routes. However, things like:
root to: 'welcome#index', via: 'get' get 'welcome/feedback', :controller => 'welcome', :action => 'feedback'
work as expected. The rake routes output from these four directives is simply:
root GET / welcome#index welcome_feedback GET /welcome/feedback(.:format) welcome#feedback
I must be missing something really simple – I’ve used these before in other Rails3 apps.with no problems but I just can’t figure this one out.