Created
July 25, 2008 23:43
-
-
Save methodmissing/2557 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Accountable | |
class Transaction < ::ActiveRecord::Base # to ensure not clashing with Accountable::ActiveRecord::Macro | |
has_many :credits | |
has_many :debits | |
end | |
end | |
module Accountable | |
module Accounts | |
class Base < ::ActiveRecord::Base #see above | |
end | |
end | |
end | |
module Accountable | |
module Accounts | |
module Debit | |
class Base < Accountable::Accounts::Base # not from the same dir, reference the whole constant | |
end | |
end | |
end | |
end | |
module Accountable | |
module Accounts | |
module Debit | |
class Expense < Base # from the same dir, reference partial constant, since it belongs to the same module | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment