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
scaffold/model/migration generators not correctly generate decimal with precision scale shorthand #4602
Comments
…ne with bash, zsh, etc, closes rails#4602 Conflicts: railties/test/generators/migration_generator_test.rb
The |
I'm on 3.2.1, ZSH and |
Hey @joneslee85 and @cgunther the |
Just to clarify the issue for the benefit of anyone who googles their way here: The Rails generator wasn't broken. The documentation just failed to take into account that curly braces are metacharacters in Bash (as well as other shells) and need to be escaped. Run
and you'll see that it expands to
The generator isn't smart enough to detect that you defined two columns named The proper thing to do is to escape the braces with either quotes or backslashes. Alternatively, you can use an alternate form that Jose Valim added last month.
|
{1,2} doesn't work |
rails g scaffold Post price:decimal{7,2}
generates:which is so wrong.
The text was updated successfully, but these errors were encountered: