I'm running into a rather weird problem... I have a model with a
"link" attribute that isn't working because it's getting clobbered by
RakeFileUtils#link
It seems as soon as you require 'rake' that RakeFileUtils gets mixed
into ActiveRecord::Base
>> require 'active_record'
=> true
>> RakeFileUtils
NameError: uninitialized constant RakeFileUtils
from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/
active_support/dependencies.rb:443:in `load_missing_constant'
>> require 'rake'
=> ["RakeFileUtils", "FileList", "RAKEVERSION"]
>> ActiveRecord::Base.include? RakeFileUtils
=> true
Any idea how this is happening exactly?
Even worse, the accessor method for the attribute seems to be getting
eventually defined in what seems to be a magical or non-deterministic
manner:
http://gist.github.com/202477
First time around:
#<Method: Channel(RakeFileUtils)#link>
Second time around:
#<Method: Channel#link>
My gut feeling is that RakeFileUtils really, really does not belong in
ActiveRecord::Base
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---