Skip to content
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

Merged
merged 1 commit into from May 3, 2011
Merged

raise an error if the old router draw method is used #377

merged 1 commit into from May 3, 2011

Conversation

joshk
Copy link
Contributor

@joshk joshk commented May 3, 2011

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

@@ -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. " <<
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rails 3.1?

Copy link
Contributor Author

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
@joshk
Copy link
Contributor Author

joshk commented May 3, 2011

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"
Copy link
Member

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?

Copy link
Contributor

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. :)

josevalim added a commit that referenced this pull request May 3, 2011
raise an error if the old router draw method is used
@josevalim josevalim merged commit f82767e into rails:master May 3, 2011
matthewd pushed a commit that referenced this pull request Apr 24, 2018
Follow up #370 for Oracle, to fix undefined method `expr' for 10:Fixnum bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants