From: "Florian Aßmann" Date: 2006-10-02T04:03:37+09:00 Subject: Re: dynamic include -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 01.10.2006 um 20:53 schrieb David Vallner: > Florian A�mann wrote: >> As you can see role is not defined when I include it, does anybody >> know >> how I can add some singleton methods to person? >> > > Maybe the module Functions is the culprit? Are the methods module > functions ("def self.some_method"), or mixin functions ("def > some_method") in the module? > > David Vallner > To be complete here if the Exception: NameError: undefined local variable or method `role' for #> /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/ active_record/base.rb:1129:in `method_missing' /Users/boof/Documents/Workspaces/rails/comany/config/../app/ models/person.rb:63:in `auth' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/ active_record/associations/association_proxy.rb:110:in `each' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/ active_record/associations/association_proxy.rb:110:in `send' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/ active_record/associations/association_proxy.rb:110:in `method_missing' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/ active_record/associations/has_and_belongs_to_many_association.rb: 81:in `method_missing' /Users/boof/Documents/Workspaces/rails/comany/config/../app/ models/person.rb:60:in `auth' test/unit/person_test.rb:37:in `test_4_change_password' -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iD8DBQFFIBD5l1R1ZNDW4WgRAgE3AJ4iG+Mmilp8wl85NJ/vIx7dWCc9LgCcDOL2 mX/zP7k1QDGj7t/KJynFlX8= =I3VI -----END PGP SIGNATURE-----