09.4
11

Rails 3.1 Released

by admin ·

To download and install available as release a framework for building Web applications rails 3.1.

The main innovations in this version:

  • Asset Pipeline - a framework for building and compressing JS and CSS is running Sprockets 2.0 . Now, as generated by the controllers, views and models for your scaffold will also be created, and JS and CSS. This allows for more user-friendly architecture and dozens of dozens of files razgresti of public / javascript on modules. The rails themselves will take care of assembling all of your client files into one, and caching. Quick Asset Pipeline
  • HTTP Streaming - will begin to download the browser style sheets and JavaScripts before the server end to form a response. The result – a significant increase in the rate of return pages. This is just an option that requires the support of web-server. A bunch of nginx + unicorn is ready to support this feature. An example of how this works and can be viewed on Railscasts .

  • jQuery is now used by default. Use the prototype can only changing jquery-rails on prototype-rails in Gemfile.
  • Other changes:
    • DRY migration, which are themselves known as a draw.
    • Mountable engines can now be to have your own space routes and helpers.
    • Prepared statements – ActiveRecord now uses cached prepared statements that give a big performance boost in PostreSQL and complex queries in MySQL. Instead of forming a request and send it to the database each time, Rails generates a query once, and then uses it as a special token (substituting the relevant data), when you need to do similar. Gives performance gains of 20-30% for simple queries, and 10-fold increase in requests per second for complex queries.
    • Rack:: Cache is enabled by default. Makes it possible to use HTTP-caching with conventional produce (Conditional Get) as a replacement to page caching. Soon page-caching will be removed from the standard distribution.
    • Turn - a new outlet for Test:: Unit in Ruby 1.9
    • ForceSSL - allows secure connections much easier.
    • Role-based mass-assignment. attr_protected now takes a role.
    • has_secure_password – simply embed password protection on BCrypt.
    • Custom serializers – now have the opportunity to specify how objects are stored in the database, not only in the format of YAML.

If you create a new application, it is best to use Ruby 1.9.2. Rails 1.8.x will support up to 4.0, but only for compatibility.

Tags: , , , , ,

Leave a Reply