Rails Edge Updates (06/28/2007) 28 Jun 2007
Here are some updates for life on Rails Edge. Kudos to the rails-team!

Additions

  • Added new date helpers: #since, #ago, #beginning_of_day, #end_of_day - “8575”:http://dev.rubyonrails.org/ticket/8575

    » Date.today.beginning_of_day => Mon Jun 04 00:00:00 -0500 2007

    » Date.today.end_of_day => Mon Jun 04 23:59:59 -0500 2007

    » Date.today.since(4.hours) => Mon Jun 04 04:00:00 -0500 2007

    »Date.today + 4.hours => Mon Jun 04 04:00:00 -0500 2007

Removals

  • findall_ and findfirst_ have been removed entirely

Rake Tasks

  • db:create - has been added to create the database for the current RAILS_ENV
  • db:create:all - has been added to create databases for each environment
  • db:version - displays the version number of your database (as shown in script/about)
  • routes - has been added to display route information

Command Line

  • script/generate can now take the ”–skip-migrations” options when generating resources

Testing

  • Test::Unit::TestCase.fixture_path is now a class inheritable attribute in Edge (has been there for a while now). This allows you have different paths to fixtures based on your test case without overwriting other TestCase subclass fixture paths.

  • collection fixtures have been added. You can now do things like:

    bob, steve = users(:bob, :steve)

Enjoy!


blog comments powered by Disqus