== ColumnWithSpaces A simple plugin that enables ActiveRecord's accessor methods and dynamic finders to work with legacy database tables that have column labels containing spaces. Include the module in your your model for a legacy database table and then you can substitute underscores for the column label spaces in your attribute accessor and dynamic find_by method calls. == Prerequisites Tests only pass against Rails 2.0.2 at present. Rspec 1.1.3 was used to write the specs == Install * git clone git://git.dentz.net/git/db_column_with_spaces.git vendor/plugins * script/plugin install svn://svn.dentz.net/svn/plugins/db_column_with_spaces/trunk == Example Given a record with following column labels and values: first name: John last name: Smith middle_name: Kyle Define a model for a legacy table: class LegacyEmployee < ActiveRecord::Base include DentzSinclair::ColumnWithSpaces end And now you can use underscores in finders and accessors. >> @employee = LegacyEmployee.find_by_last_name('Smith') => # >> @employee.first_name => "John" >> @employee.first_name = "Walter" => "Walter" >> @employee.save => true >> @employee => # Copyright (c) 2008 [Eirik Dentz Sinclair], released under the MIT license == Acknowledgements Inspiration: * http://snippets.dzone.com/posts/show/2034 Testing and design: * http://alexyoung.org/articles/show/44/rails_plugin_testing_guide * http://agilewebdevelopment.com/plugins/will_paginate