[ANN] Rails 0.6.0, Active Record 0.9.3, Action Pack 0.7.9

I gather that most people are now familar with the RoR suite, so I'm skipping the formal introductions and will just bring you the meat.

Get it all from http://www.rubyonrails.org, talk it up on #rubyonrails (FreeNet).

Rails 0.6.0: AAC, Environments, Easier starts

···

=============================================

This is a major upgrade to the Rails infrastructure. There's a new AbstractApplicationController that can hold filters and methods available to all controllers. There's a new concept of [[Environments]] that should make it much easier to write maintenance scripts and to interact with a live system through IRB. It basically gives you access to the fully configured model by just including one file. This release also contains a bunch of fixes to make it easier to get started on Rails. See the ChangeLog for more.

* Added AbstractionApplicationController as a superclass for all controllers generated. This class can be used to carry filters and methods that are to be shared by all. It has an accompanying ApplicationHelper that all controllers will also automatically have available.

* Added environments that can be included from any script to get the full Active Record and Action Controller context running. This can be used by maintenance scripts or to interact with the model through IRB. Example:

     require 'config/environments/production'

     for account in Account.find_all
       account.recalculate_interests
     end

   A short migration script for an account model that had it's interest calculation strategy changed.

* Accessing the index of a controller with "/weblog" will now redirect to "/weblog/" (only on Apache, not WEBrick)

* Simplified the default Apache config so even remote requests are served off CGI as a default. You'll now have to do something specific to activate mod_ruby and FCGI (like using the force urls). This should make it easier for new comers that start on an external server.

* Added more of the necessary Apache options to .htaccess to make it easier to setup

* Upgraded to Action Pack 0.7.9 (lots of fixes)

* Upgraded to Active Record 0.9.3 (lots of fixes)

Active Record 0.9.3: We Love PostgreSQL Too

While MySQL might have had an early start on the love, PostgreSQL is catching up fast. This release includes a bunch of fixes for the popular open source database along with a few new features (exclusively_dependent option for has_many) and other important bug fixes (AR records with associations can now be saved in PStore sessions). Read more the new methods in CHANGELOG (http://ar.rubyonrails.org/files/CHANGELOG.html)

* Fixed bug with using a different primary key name together with has_and_belongs_to_many [Investigation by Scott]

* Added :exclusively_dependent option to the has_many association macro. The doc reads:

     If set to true all the associated object are deleted in one SQL statement without having their
     before_destroy callback run. This should only be used on associations that depend solely on
     this class and don't need to do any clean-up in before_destroy. The upside is that it's much
     faster, especially if there's a counter_cache involved.

* Added :port key to connection options, so the PostgreSQL and MySQL adapters can connect to a database server
   running on another port than the default.

* Converted the new natural singleton methods that prevented AR objects from being saved by PStore
   (and hence be placed in a Rails session) to a module. [Florian Weber]

* Fixed the use of floats (was broken since 0.9.0+)

* Fixed PostgreSQL adapter so default values are displayed properly when used in conjunction with
   Action Pack scaffolding.

* Fixed booleans support for PostgreSQL (use real true/false on boolean fields instead of 0/1 on tinyints) [radsaq]

Action Pack 0.7.9: Extremely pretty URLs

A bunch of new features for providing even better support for pretty URLs. It's now possible to centralize and reuse much of the URL setups. This release also makes it possible to use your own layout in conjunction with scaffolding. So now you can make it fast _and_ look good. See it all in CHANGELOG (http://ap.rubyonrails.org/files/CHANGELOG.html)

* The "form" method now present boolean fields from PostgreSQL as drop-down menu. [Scott]

* Scaffolding now automatically attempts to require the class that's being scaffolded.

* Scaffolding will use the current active layout, instead of its own, if one has been specified. Example:

     class WeblogController < ActionController::Base
       layout "layouts/weblog"
       scaffold :post
     end

   [Suggested by Scott]

* Changed url_for (and all the that drives, like redirect_to, link_to, link_for) so you can pass it a symbol instead of a hash. This symbol is a method reference which is then called to calculate the url. Example:

     class WeblogController < ActionController::Base
       def update
         # do some update
         redirect_to :dashboard_url
       end

       protected
         def dashboard_url
           if @project.active?
             url_for :controller => "project", :action => "dashboard"
           else
             url_for :controller => "account", :action => "dashboard"
           end
         end
     end

* Added default_url_options to specialize behavior for all url_for (and friends) calls:

     Overwrite to implement a number of default options that all url_for-based methods will use.
     The default options should come in form of a hash, just like the one you would use for
     url_for directly. Example:

       def default_url_options(options)
         { :controller_prefix => @project.active? ? "projects/" : "accounts/" }
       end

     As you can infer from the example, this is mostly useful for situations where you want to
     centralize dynamic dissions about the urls as they stem from the business domain. Please note
     that any individual url_for call can always override the defaults set by this method.

* Changed url_for so that an "id" passed in the :params is not treated special. You need to use the dedicated :id to get the special auto path-params treatment. Considering the url http://localhost:81/friends/list

     url_for(:action => "show", :params => { "id" => 5 })
       ...used to give http://localhost:81/friends/show/5
       ......now gives http://localhost:81/friends/show?id=5

     If you want the automated id behavior, do:

     url_for(:action => "show", :id => 5 )
       ....which gives http://localhost:81/friends/show/5

* Fixed problem with anchor being inserted before path parameters with url_for (and friends)

--
David Heinemeier Hansson,
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://www.instiki.org/ -- A No-Step-Three Wiki in Ruby
http://www.basecamphq.com/ -- Web-based Project Management
http://www.loudthinking.com/ -- Broadcasting Brain
http://www.nextangle.com/ -- Development & Consulting Services

Cool, but does RoR runs under ruby win32?

"David Heinemeier Hansson" <david@loudthinking.com> wrote in message
news:19F00452-E7AD-11D8-8BDC-000A958E6254@loudthinking.com...

···

I gather that most people are now familar with the RoR suite, so I'm
skipping the formal introductions and will just bring you the meat.

Get it all from http://www.rubyonrails.org, talk it up on #rubyonrails
(FreeNet).

Rails 0.6.0: AAC, Environments, Easier starts

This is a major upgrade to the Rails infrastructure. There's a new
AbstractApplicationController that can hold filters and methods
available to all controllers. There's a new concept of [[Environments]]
that should make it much easier to write maintenance scripts and to
interact with a live system through IRB. It basically gives you access
to the fully configured model by just including one file. This release
also contains a bunch of fixes to make it easier to get started on
Rails. See the ChangeLog for more.

* Added AbstractionApplicationController as a superclass for all
controllers generated. This class can be used to carry filters and
methods that are to be shared by all. It has an accompanying
ApplicationHelper that all controllers will also automatically have
available.

* Added environments that can be included from any script to get the
full Active Record and Action Controller context running. This can be
used by maintenance scripts or to interact with the model through IRB.
Example:

     require 'config/environments/production'

     for account in Account.find_all
       account.recalculate_interests
     end

   A short migration script for an account model that had it's interest
calculation strategy changed.

* Accessing the index of a controller with "/weblog" will now redirect
to "/weblog/" (only on Apache, not WEBrick)

* Simplified the default Apache config so even remote requests are
served off CGI as a default. You'll now have to do something specific
to activate mod_ruby and FCGI (like using the force urls). This should
make it easier for new comers that start on an external server.

* Added more of the necessary Apache options to .htaccess to make it
easier to setup

* Upgraded to Action Pack 0.7.9 (lots of fixes)

* Upgraded to Active Record 0.9.3 (lots of fixes)

Active Record 0.9.3: We Love PostgreSQL Too

While MySQL might have had an early start on the love, PostgreSQL is
catching up fast. This release includes a bunch of fixes for the
popular open source database along with a few new features
(exclusively_dependent option for has_many) and other important bug
fixes (AR records with associations can now be saved in PStore
sessions). Read more the new methods in CHANGELOG
(http://ar.rubyonrails.org/files/CHANGELOG.html\)

* Fixed bug with using a different primary key name together with
has_and_belongs_to_many [Investigation by Scott]

* Added :exclusively_dependent option to the has_many association
macro. The doc reads:

     If set to true all the associated object are deleted in one SQL
statement without having their
     before_destroy callback run. This should only be used on
associations that depend solely on
     this class and don't need to do any clean-up in before_destroy. The
upside is that it's much
     faster, especially if there's a counter_cache involved.

* Added :port key to connection options, so the PostgreSQL and MySQL
adapters can connect to a database server
   running on another port than the default.

* Converted the new natural singleton methods that prevented AR objects
from being saved by PStore
   (and hence be placed in a Rails session) to a module. [Florian Weber]

* Fixed the use of floats (was broken since 0.9.0+)

* Fixed PostgreSQL adapter so default values are displayed properly
when used in conjunction with
   Action Pack scaffolding.

* Fixed booleans support for PostgreSQL (use real true/false on boolean
fields instead of 0/1 on tinyints) [radsaq]

Action Pack 0.7.9: Extremely pretty URLs

A bunch of new features for providing even better support for pretty
URLs. It's now possible to centralize and reuse much of the URL setups.
This release also makes it possible to use your own layout in
conjunction with scaffolding. So now you can make it fast _and_ look
good. See it all in CHANGELOG
(http://ap.rubyonrails.org/files/CHANGELOG.html\)

* The "form" method now present boolean fields from PostgreSQL as
drop-down menu. [Scott]

* Scaffolding now automatically attempts to require the class that's
being scaffolded.

* Scaffolding will use the current active layout, instead of its own,
if one has been specified. Example:

     class WeblogController < ActionController::Base
       layout "layouts/weblog"
       scaffold :post
     end

   [Suggested by Scott]

* Changed url_for (and all the that drives, like redirect_to, link_to,
link_for) so you can pass it a symbol instead of a hash. This symbol is
a method reference which is then called to calculate the url. Example:

     class WeblogController < ActionController::Base
       def update
         # do some update
         redirect_to :dashboard_url
       end

       protected
         def dashboard_url
           if @project.active?
             url_for :controller => "project", :action => "dashboard"
           else
             url_for :controller => "account", :action => "dashboard"
           end
         end
     end

* Added default_url_options to specialize behavior for all url_for (and
friends) calls:

     Overwrite to implement a number of default options that all
url_for-based methods will use.
     The default options should come in form of a hash, just like the
one you would use for
     url_for directly. Example:

       def default_url_options(options)
         { :controller_prefix => @project.active? ? "projects/" :
"accounts/" }
       end

     As you can infer from the example, this is mostly useful for
situations where you want to
     centralize dynamic dissions about the urls as they stem from the
business domain. Please note
     that any individual url_for call can always override the defaults
set by this method.

* Changed url_for so that an "id" passed in the :params is not treated
special. You need to use the dedicated :id to get the special auto
path-params treatment. Considering the url
http://localhost:81/friends/list

     url_for(:action => "show", :params => { "id" => 5 })
       ...used to give http://localhost:81/friends/show/5
       ......now gives http://localhost:81/friends/show?id=5

     If you want the automated id behavior, do:

     url_for(:action => "show", :id => 5 )
       ....which gives http://localhost:81/friends/show/5

* Fixed problem with anchor being inserted before path parameters with
url_for (and friends)

--
David Heinemeier Hansson,
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://www.instiki.org/ -- A No-Step-Three Wiki in Ruby
http://www.basecamphq.com/ -- Web-based Project Management
http://www.loudthinking.com/ -- Broadcasting Brain
http://www.nextangle.com/ -- Development & Consulting Services

They are now available in the preliminary Ruby Production Archive (RPA) repository:
actionpack 0.7.9-1 A control-flow and template package for the VC part of MVC.
activerecord 0.9.3-1 Object-relation mapping put on rails.
rails 0.6.0-1 Web-application and persistance framework.
railties 0.6.0-1 Create Rails web-applications easily.

Rails 0.6.0 can be installed by doing
  rpa update
  rpa install rails
as shown in the movie at
http://rpa-base.rubyforge.org/wiki/wiki.cgi?Rpa_Base_In_Action/Installing_Rails

The initial setup of a Rails application is made easier through a small
utility included in the railties package. See
http://rpa-base.rubyforge.org/wiki/wiki.cgi?Rails_Usage for a
minimalistic Rails app. example.

···

On Fri, Aug 06, 2004 at 10:32:51PM +0900, David Heinemeier Hansson wrote:

Rails 0.6.0: AAC, Environments, Easier starts
Active Record 0.9.3: We Love PostgreSQL Too
Action Pack 0.7.9: Extremely pretty URLs

--
Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com

Cool, but does RoR runs under ruby win32?

Sure does! And have since 0.5.5. Enjoy.

···

--
David Heinemeier Hansson,
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://www.instiki.org/ -- A No-Step-Three Wiki in Ruby
http://www.basecamphq.com/ -- Web-based Project Management
http://www.loudthinking.com/ -- Broadcasting Brain
http://www.nextangle.com/ -- Development & Consulting Services