Reputation: 1953
I just changed the name of my model transaction
to deed
, changed the controller names, helper names, ran the migration etc. etc.
Unfortunately I get the error:
Routing Error
Couldn't find TransactionsHelper,
expected it to be defined in helpers/transactions_helper.rb
and
app/controllers/application_controller.rb:1:in `<top (required)>'
app/controllers/static_pages_controller.rb:1:in `<top (required)>'
No remaining reference to TransactionsHelper
transaction(s)
or Transaction(s)
remain in any of my files however.
Is there something that I am missing?
Upvotes: 1
Views: 316
Reputation: 26
In the refactoring you probably did a search/replace but possibly left the original file behind.
You need to check out your app/helpers folder.
If you have a file called transactions_helper.rb make sure the the first line is
module TransactionsHelper
and not
module DeedsHelper
Upvotes: 0
Reputation: 1447
I recently had this same problem. I know this is a very old question, but if this helps anyone out, I had to change the module name inside the helper as well as the name of the helper itself.
In this case that would mean the contents of deeds_helper.rb
would be:
module DeedsHelper
...contents of helper...
end
Upvotes: 1