I''m trying to replace human_name following this howto: http://wiki.rubyonrails.com/rails/show/HowToAutomaticallyLoadFile I''ve got this in environmant.rb: require ''active_record_patch.rb'' #This is lib\active_record_patch.rb class ActiveRecord::Base::Column alias __human_name human_name #make new version optionally take a language parameter. def human_name(lang = nil) return ''OK''+__human_name end end ##### This is the error: it complains for not being able to find human_name. R:\>ruby script\server ./script/../config/../lib/active_record_patch.rb:2: undefined method `human_name'' for class `ActiveRecord::Base::Column'' (NameError) from c:/programmi/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'' from c:/programmi/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'' from c:/programmi/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/dependencies.rb:200:in `require'' from ./script/../config/environment.rb:87 from c:/programmi/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'' from c:/programmi/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'' from script/server:42 Any idea about what happens? thanks Luca Mearelli
On Aug 24, 2005, at 5:31 PM, Luca Mearelli wrote:> I''m trying to replace human_name following this howto: > http://wiki.rubyonrails.com/rails/show/HowToAutomaticallyLoadFile > > I''ve got this in environmant.rb: > > require ''active_record_patch.rb'' > > > #This is lib\active_record_patch.rb > class ActiveRecord::Base::ColumnActiveRecord::ConnectionAdapters::Column is what you want here. -Scott