From: Rob Marshall Date: 2013-01-29T02:11:38+09:00 Subject: ActiveRecord class for multiple tables Hi, I assume that this has been answered, I just haven't been able to find it...I have a database with a 10 tables named: data_table_00 through data_table_09. They are all identical and I'm new to Ruby and trying to figure out the best way, using ActiveRecord, to define the class. I would like to be able to specify the table number at initialization. I have done: irb> class DataTable < ActiveRecord::Base irb> end Then: irb> dt0 = DataTable.set_table_name 'data_table_00' And that seems to work - of course irb gives me lots of output...but we'll skip that part. But I was just wondering if there's a "cleaner" way to do this. Thanks, Rob -- Posted via http://www.ruby-forum.com/.