TalentBox/sequel-rails — pull request #75 by jihwans (2014-09-25 18:31:47+00:00)
Title: Smart model base class emitter with multiple DB support

This commit allows emitting model base class these variously convenient ways:

~~~
#let's say we have these in addition to development, production, etc:
ndb_development:
prefix: dev
...
nbd_production:
...

class MyModel < Sequel::Model(db: 'ndb')
class MyModel < Sequel::Model(:table_name, db: :ndb)
class MyModel < Sequel::Model(:table_name, db: :ndb)
class MyModel < Sequel::Model(prefix: 'inventory')
class MyModel < Sequel::Model(:table_name, db: :ndb, prefix: 'sales')
class MyModel < Sequel::Model(table: 'table_name', db: :ndb, prefix: 'sales')

# PLUS any method that Sequel::Model supported previously
~~~