

Rails 3 Beta 2 released - bkudria
http://github.com/rails/rails/commit/f0364d87f03d58312bcab1b2f17b5b56b6c72653

======
_pius
I'm loving Rails 3 Beta 1, but I'm surprised they've broken Ruby 1.9.1
compatibility with today's release. Not to be a hater, but I don't see the
point of releasing a new beta after introducing a regression so serious that
it causes the framework to segfault on the current stable Ruby.

~~~
FooBarWidget
I don't think it's a bad thing. Ruby 1.9.1 needs to go. There are a number of
bugs and quirks in 1.9.1 which have been fixed in 1.9.2. E.g. while developing
Phusion Passenger I've noticed some VM deadlock bugs, all of which are now
fixed.

~~~
_pius
_Ruby 1.9.1 needs to go._

I agree, but I don't think Ruby 1.9.2 is slated for release until the end of
August.

~~~
sailormoon
Well, that's less than 3 months away. Not so bad.

1.9.2 release plan, for those who missed it:

    
    
      - 31 Mar.  freeze the spec
      - 30 Apr.  freeze the code
      - 31 May.  release 1.9.2-preview2
      - 30 Jun.  release 1.9.2-rc
      - 31 Jul.  release 1.9.2-p0

------
bkudria
Official blog post: [http://weblog.rubyonrails.org/2010/4/1/rails-3-0-second-
beta...](http://weblog.rubyonrails.org/2010/4/1/rails-3-0-second-beta-release)

------
dasil003
I clicked through and extracted all the changes since beta 1. This is probably
only useful for people who have already spent some time with the first beta
but haven't been following development since then:

ACTIONMAILER

* Added interceptors and observers from Mail [ML]
    
    
        ActionMailer::Base.register_interceptor calls Mail.register_interceptor
        ActionMailer::Base.register_observer calls Mail.register_observer
    

* Whole new API added with tests. See base.rb for full details. Old API is deprecated.

ACTIONPACK

* #concat is now deprecated in favor of using <%= %> helpers [YK]

* Block helpers now return Strings, so you can use <%= form_for @foo do |f| %>. <% form_for do |f| %> still works with deprecation notices [YK]

* Add a new #mount method on the router that does not anchor the PATH_INFO at the end [YK & CL]

* Create a new LookupContext object that is responsible for performantly finding a template for a given pattern [JV]

* Removed relative_url_for in favor of respecting SCRIPT_NAME [YK & CL]

* Changed file streaming to use Rack::Sendfile middleware [YK]

* ActionDispatch::Request#content_type returns a String to be compatible with Rack::Request. Use #content_mime_type for the Mime::Type instance [YK]

* Updated Prototype to 1.6.1 and Scriptaculous to 1.8.3 [ML]

* Change the preferred way that URL helpers are included into a class[YK & CL]
    
    
        # for all helpers including named routes
        include Rails.application.router.url_helpers
    
        # for just url_for
        include Rails.application.router.url_for
    
    

ACTIVEMODEL

* #new_record? and #destroyed? were removed from ActiveModel::Lint. Use persisted? instead. A model is persisted if it's not a new_record? and it was not destroyed? [MG]

* Added validations reflection in ActiveModel::Validations [JV]
    
    
        Model.validators
        Model.validators_on(:field)
    

* #to_key was added to ActiveModel::Lint so we can generate DOM IDs for AMo objects with composite keys [MG]

ACTIVESUPPORT

* Reduced load time by deferring configuration of classes using ActiveSupport::on_load(:component_name) [YK]

* Rename #metaclass to #singleton_class now that ruby-core has decided [JK]

* New assertions assert_blank and assert_present. #4299 [Juanjo Bazan]

* Use Object#singleton_class instead of #metaclass. Prefer Ruby's choice. [Jeremy Kemper]

* JSON backend for YAJL. Preferred if available. #2666 [Brian Lopez]

RAILTIES

* Session store configuration has changed [YK & CL]
    
    
        config.session_store :cookie_store, {:key => "..."}
        config.cookie_secret = "fdsfhisdghfidugnfdlg"
    

* railtie_name and engine_name are deprecated. You can now add any object to the configuration object: config.your_plugin = {} [JK]

* Added config.generators.templates to provide alternative paths for the generators to look for templates [JV]

------
snitko
Anybody knows what's the deal with rspec finally supporting Rails 3?

~~~
spohlenz
It's in the works, and for the most part works well:
<http://github.com/rspec/rspec>

------
ryanisinallofus
Why today of all days?

~~~
aphistic
Because everyone knows rails is a joke!

... I'm kidding, I love rails. I'm really looking forward to v3 being in
production. :)

------
benatkin
Subtle prank in there: if you look at the CHANGELOG diff, the date format is
different for April Fools' day. "April 1st, 2010" vs "February 4, 2010"

------
TheDudeAbides
It's because the Rails team knows they are about to lose a lot of people to
Padrino. Got to act fast before people realize how much of a better framework
it is!

~~~
FooBarWidget
Lame. How old are you, 12? I find it "interesting" that developers of
competing software usually get along fine, but for some reason the users feel
the need to attack, flame at and troll at each other.

~~~
techiferous
"How old are you, 12?"

I downvoted you for this disrespectful comment. I don't think this is the tone
most of Hacker News users want on this site.

~~~
TheDudeAbides
Thanks techiferous, though looking at my comment I can understand why it would
rub some the wrong way - will try to be more diplomatic in the future.

