New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
raise an error if the old router draw method is used #377
Conversation
@@ -240,6 +240,11 @@ module ActionDispatch | |||
end | |||
|
|||
def eval_block(block) | |||
if block.arity == 1 | |||
raise "You are using the old router DSL which has been removed in Rails 3.2. " << |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rails 3.1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahhhhhhh bugger :)
one sec
…ssage advising them to either upgrade their routes or add rails_legacy_mapper to their Gemfile
updated :) |
if block.arity == 1 | ||
raise "You are using the old router DSL which has been removed in Rails 3.1. " << | ||
"Please check how to update your routes file at: http://www.engineyard.com/blog/2010/the-lowdown-on-routes-in-rails-3/ " << | ||
"or add the rails_legacy_mapper gem to your Gemfile" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also add the github url of the gem as part of the message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah, it is fine without the github url. If someone really needs it, they can find it. :)
raise an error if the old router draw method is used
Follow up #370 for Oracle, to fix undefined method `expr' for 10:Fixnum bug.
Hey Guys,
This commit raises an error if the old router draw method is used, along with a message advising them to either upgrade their routes or add rails_legacy_mapper to their Gemfile.
Let me know if the error type needs changing.
Thanks,
Josh