At Gojee, we are running Rails 3.0.7.  Recently, we’ve been experimenting with the Sprockets, Coffeescript, and Sass.

With tonight’s release of 3.1.0.  All of our experimentation will soon become fully compatible with mainstream Rails, since 3.1.0 comes with default support for JQuery, Sprockets, Coffeescript and Sass.

I also found the following updates to 3.1.0 awesome and important.  For the full list go here

 

Reading up on some of the rails 3.1 features:

  • HTTP Streaming, allowing a user’s browser to download Stylesheets and JS while the server is generating the response.
  • Default scopes are now evaluated at the latest possible moment, to avoid problems where scopes would be created which would implicitly contain the default scope, which would then be impossible to get rid of via Model.unscoped.
  • Support the :dependent option on has_many :through associations. For historical and practical reasons, :delete_all is the default deletion strategy employed byassociation.delete(*records), despite the fact that the default strategy is :nullifyfor regular has_many. Also, this only works at all if the source reflection is a belongs_to. For other situations, you should directly modify the through association.
  • Migrations are now reversible, meaning that Rails will figure out how to reverse your migrations. To use reversible migrations, just define the change method.
  • class MyMigration < ActiveRecord::Migration
      def change
        create_table(:horses) do
          t.column :content, :text
          t.column :remind_at, :datetime
        end
      end
    end
  • Migrations now use instance methods rather than class methods
  • class FooMigration < ActiveRecord::Migration
      def up # Not self.up
        ...
      end
    end

 

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>