Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

Adam Keys's latest activity

Wednesday, June 11 2008
312 Database config in Ruby was updated in Ruby on Rails
  • Adam Keys
    Adam Keys commented at 11:31 PM

    Trevor: indeed, I considered using a Hash. However, using a proper object makes it easier to yell at those who would explicitly set a username/password for the...

  • Adam Keys
    Adam Keys commented at 4:31 PM

    @James yeah its completely possible to define the whole thing in environment.rb like so:

      config.active_record.connection.configure do |db|
        db.adapter  ...
Sunday, June 08 2008
312 Database config in Ruby was updated in Ruby on Rails
  • Adam Keys
    Adam Keys commented at 5:54 PM

    Updated patch to allow DRYer AR configuration. In environment.rb :

    config.active_record.configure do |db|
        
        db.encoding = utf8
        db.adapter = 'mys...
Friday, June 06 2008
312 Database config in Ruby was updated in Ruby on Rails
  • Adam Keys
    Adam Keys commented at 2:52 PM

    I went ahead and did the generators. Here's what it looks like for a fresh app generated for MySQL:

      # Specify your database connections. You can partially c...
  • Adam Keys
    Adam Keys commented at 1:01 PM

    Jeremy: well in this case, having real methods makes it cleaner, IMHO, to do things like yell at the developer if they set a username/password in production mo...

  • Adam Keys
    Adam Keys commented at 7:05 AM

    Just attached a reworked version. This time 'round, the database config hangs off of ActiveRecord itself. You can set it in your generic environment or a speci...

Tuesday, June 03 2008
312 Database config in Ruby was updated in Ruby on Rails
  • Adam Keys
    Adam Keys commented at 5:58 PM

    Really attach the patch this time.

  • Adam Keys
    Adam Keys created the ticket at 6:22 AM

    This patch allows a developer to configure their database via Ruby in addition to the existing database.yml. First, one specifies the path to the Ruby file:

    c...