Created
September 29, 2012 17:15
-
-
Save robertsosinski/3804621 to your computer and use it in GitHub Desktop.
Nesting ActiveRecord models into separate schemas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Inventory | |
class Base < ActiveRecord::Base | |
self.abstract_class = true | |
self.table_name_prefix = 'inventory.' | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Ticket < Inventory::Base | |
belongs_to :venue | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment