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

Removed sorting of attribute names in controller generator. #7740

Merged
merged 2 commits into from Sep 23, 2012

Commits on Sep 23, 2012

  1. Removed sorting of attribute names in controller generator.

    I believe when people use generators, they typically order the
    parameters on the command line in an order that makes sense
    to them.  Sorting them in the generated code  makes the order
    seem more arbitrary to humans, even though it's less arbitrary
    to computers. :-)
    
    Example:
    
        rails g scaffold Post title:string content:text
    
    The human chose to put title before content. Sorted
    attributes in the generated code work but don't match the
    human's intent:
    
        params.require(:posts).permit(:content, :title)
    BMorearty committed Sep 23, 2012
    Copy the full SHA
    263764d View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    5a76d08 View commit details
    Browse the repository at this point in the history