Rails 3.1 Awesomeness - what's new

4,201 views

Published on

Steven Ringo from Dynamic Clarity and Ryan Bigg from RubyX presents what's new in Rails 3.1 for Ruby on Rails Oceania's Sydney Meet-up for May 2011.

Published in: Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,201
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
28
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Rails 3.1 Awesomeness - what's new

  1. 1. Rails 3.1 awesomenessfor roro Sydney Meet-up May 2011 Steven Ringo steven@dynamicclarity.com Ryan Bigg radarlistener@gmail.com
  2. 2. http://www.flickr.com/photos/23611308@N03/4252962768/
  3. 3. massive
  4. 4. see full list athttps://gist.github.com/958283 *thanks to Ryan Bates for the list
  5. 5. jQuery new default jquery-rails gemprototype-rails gem
  6. 6. Sass (scss) is a first-class citizen wtf is sass? see also compass:http://compass-style.org/reference/compass/
  7. 7. asset packaging
  8. 8. CoffeeScript Compiles to JavaScript Ruby-like syntactic sugar to enhance JSArray comprehension and pattern matching Don’t freak out, its not mandatory
  9. 9. Identity Map in-memory cache to preventduplicate retrieval of the same object data from the database
  10. 10. HTTP Streaming http://en.wikipedia.org/wiki/Manneken_Pis
  11. 11. a.k.a. chunked transfer encodingsend content to the browser before the server is finished processing ostensibly faster page loadshttp://weblog.rubyonrails.org/2011/4/18/why-http-streaming classic asp had this in 1997: <%response.Buffer=true%>
  12. 12. BActiveModel::SecurePassword
  13. 13. ActiveModel::SecurePassword BCrypt = brute force resistant Can be made slower... (Moore’s law)class User < ActiveRecord::Base has_secure_passwordend
  14. 14. Reversible Migrations snoitargiM elbisreveRMigration system will figure out how to reverse your migration. Instance methods, not class methods. class MyMigration < ActiveRecord::Migration def change create_table(:horses) do t.column :content, :text t.column :remind_at, :datetime end end end
  15. 15. Mass assignment with rolesclass Post < ActiveRecord::Base attr_accessible :title attr_accessible :title, :published_at, :as => :adminendPost.new(params[:post], :as => :admin)
  16. 16. Railscasts on 3.1 ep #265 10/5/2011

×