Kieran PThe ActionMailer example on page 27 has also changed from delivers_from to default :from => '....'. Also, UJS and XSS stuff remains the same for developers, but got big rewrites recently under the hood.3 years ago
Not ready...
● 3.0pre not released yet
● http://oscardelben.com/articles/2009/12/06/how
totestrails3.html
On to Cool Stuff...
Have It Your Way
More modular
● Standard Rails will work out of the box
● Swap AR with DataMapper
● http://www.slideshare.net/mattetti/rails3
steppingoffofthegoldenpath
.....
ActionController
● Based on Metal
● Swap out stuff you don't need for performance
● http://www.engineyard.com/blog/2010/railsand
merbmergepluginapipart3of6/
ActiveRecord & Arel
Arel
● compose queries using relational algreba (
http://github.com/rails/arel)
● Lazy loading in 3.1
(http://m.onkey.org/2010/1/22/activerecord
queryinterface)
Bundler
● No more config.gem
● Gemfile
● Evaluates all dependencies at once
● Deploying and freezing native gems !
● http://github.com/wycats/bundler
Gemfile
Config files *
● config/environment.rb shrunk
● New file : config/application.rb
● Application name seems to matter now
(https://rails.lighthouseapp.com/projects/8994/ti
ckets/3556app_generatorshoulddisallowor
fixinvalidapp_const)
config/environment.rb
config/application.rb
config/boot.rb
Routing
More power to the people
Routing
● More flexible
● Can point to any Rack application
● “main#home == MainController.action(:home)
== a Rack application”
● http://yehudakatz.com/2009/12/26/therails3
routerrackitup/
Routing
Routing
ActionMailer
● Looks more like a Controller now
● http://gist.github.com/281420
ActionMailer
http://gist.github.com/281420
Javascript
Javascript
● Unobtrusive
● Easier to swap out with Jquery
● Uses HTML5 data* attributes
ActiveModel
Get Validations, etc by including
ActiveModel::Validations
Rails::Subscriber
● Get hooks for notifications, etc.
● E.g. Output ActiveRecord SQL to Growl
● http://hasmanyquestions.wordpress.com/2010/0
1/17/letyoursqlgrowlinrails3/
XSS protection
● eRB now escaped by default
● Use raw to not escape
● Try out the plugin
http://github.com/NZKoz/rails_xss
You mention on page 16 that the bundler is under wycats/bundler.
This has been moved, and the old one no longer maintained.
The new one is now at http://github.com/carlhuda/bundler 3 years ago