- https://gist.github.com/958283
- https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/milestones/71470-31
- http://hemju.com/2011/02/23/rails-3-1-release-rumors-and-news-about-features/
- http://www.hagenburger.net/TALKS/rails-3.1-frontend-performance.html#slide1
Console shows SQL queries right there.
- http://getsprockets.org/
- http://www.rubyinside.com/rails-3-1-adopts-coffeescript-jquery-sass-and-controversy-4669.html
- http://jackdempsey.me/2011/04/22/rails-3-1-sprockets-and-coffeescript.html
Add Rack::Cache to the default stack. Create a Rails store that delegates to the Rails cache, so by default, whatever caching layer you are using will be used for HTTP caching. Note that Rack::Cache will be used if you use #expires_in, #fresh_when or #stale with :public => true. Otherwise, the caching rules will apply to the browser only. [Yehuda Katz, Carl Lerche]
- http://piotrsarnacki.com/2010/09/14/mountable-engines/
- http://www.builtfromsource.com/2010/12/13/mountable-engines-in-rails-3-1-beta-getting-started/
- http://weblog.rubyonrails.org/2011/4/18/why-http-streaming
- http://yehudakatz.com/2010/09/07/automatic-flushing-the-rails-3-1-plan/
automatically adds :multipart => true to the enclosing form.
...
form_for(@post, remote: true, method: :delete) instead of form_for(@post, remote: true, html: { method: :delete })
Make JavaScriptHelper#j() an alias for JavaScriptHelper#escape_javascript()
tag("div", :data => {:name => 'Stephen', :city_state => %w(Chicago IL)}) =>
attr_accessible :title, :published_at, :as => :admin Post.new(params[:post], :as => :admin)
assign_attributes() with similar API was also added and attributes=(params, guard) was deprecated.
update_column method on ActiveRecord. This new method updates a given attribute on an object, skipping validations and callbacks.
class MyMigration < ActiveRecord::Migration def change create_table(:horses) do t.column :content, :text t.column :remind_at, :datetime end end end
Migrations should use instance methods rather than class methods: