This week’s report covers changes from 5th May 2008 to 11th May 2008 (the day the corresponding Rails Envy podcast was recorded).


A script/dbconsole script has been added that allows you to connect to your database using its console client.

If you needed to connect to your production MySQL database (you better know what you are doing!), for example, you can run RAILS_ENV=production script/dbconsole or simply script/dbconsole production (thanks to Ryan Bates for pointing this out!) and it will login to your database server using the command line MySQL client. This also works with the PostgreSQL and SQLite databases.

To use this script in your Rails app, remember to run rake rails:update:scripts after updating to edge Rails.

This nice little enhancement courtesy of Steve Purcell, who originally had a similar database console plugin.

Related changeset: is now accessible in tests

This is something that many of us Rails developers have probably come across when writing tests for flash messages being set with, myself included. Basically, you couldn't test the contents of your because they were always being emptied before your test could get to them.

# In your controller:[:notice] = 'You gotta be kidding me!'

# In your test:
assert_equal 'You gotta be kidding me!',[:notice]
# FAILS because[:notice] is nil

Andreas Neuhaus took a good look at how it works and figured out how to make testing work without resorting to assert_selects.

Related changeset:

There isn't much else of note so far but if you'd like to know every gritty detail, you'd probably want to peruse the Rails commit logs. As always, let me know of any suggestions or how I can improve the Living on the Edge (of Rails) series.