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
Ensure valid migration filename on generating migration #7419
Ensure valid migration filename on generating migration #7419
Conversation
releu
commented
Aug 22, 2012
|
||
|
||
unless @migration_file_name =~ /^[_a-z0-9]+$/ | ||
raise ActiveRecord::IllegalMigrationNameError.new(@migration_file_name) |
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.
We should not reference ActiveRecord from the Rails directory. Or we should move this validation to the Active Record migration generator or provide a similar error in Rails. Given that this validation is specific to Active Record, I would do the former.
Thanks. I have moved validation to AR. Is it ok to use AR::IllegalMigrationNameError in tests? |
It is nice to raise an error if the name of the migration is incorrect. |
So.. Merge or Close? |
I'm 👍, just squash your commits into one and rebase, otherwise it will be the next request ;) |
Yep, both those will need done. |
All done |
👍 Also I just want |
Somehow, it's out of date again. |
I don't understand what is wrong. What should I do? |
Rebase it again. This happens often when CHANGELOGS get merged, they tend to cause a conflict. |
Rebased |
@steveklabnik you don't see a green button right? Btw why github doesn't show other people that this PR needs to be rebased? |
Another one rebase :) |
No idea. You should tell them. ;) |
Is it unavailable again? |
Oh, no, you're good. I'm not allowed to merge, or I would. You'll have to wait for someone on core. |
move validation to AR
bump! |
…nerator Ensure valid migration filename on generating migration
Update Active Record CHANGELOG for #7419 [ci skip]