ChangesInRails31
Here’s an overview of some of the bigger changes:
- Generated code is aware of which version of Ruby you are using. It will take advantage of the new and cleaner hash value syntax available in Ruby 1.9.2, and will also format the output of tests differently.
- Asset management is now a core part of Rails. This changes where you place a number of files, and adds a step to deployment.
- SCSS is available by default, which changes both the syntax and the organization of all of the stylesheets.
- JQuery replaces Prototype and Script.aculo.us, changing the JavaScript code that you will write.
- CoffeeScript is available by default, which changes the syntax of client-side scripts.
- Migration methods are no longer class methods, and in most cases are automatically reversible.
- Default serialization of responses is now JSON instead of XML. There also is a handy new
jview helper that makes producing JSON (and JavaScript in general) responses easier. - A
has_secure_passwordmethod has been added to the model, which encapsulates and standardizes common user password hashing logic. Rack::Cacheis enabled by default in production.- The
mysql2gem replacesmysqlgem.
For further details, see the release notes.

