_The answer to the question posed in this page: You can require library files in @config/environment.rb@ to cause them to be loaded before your models are setup, and to always be included. - [[Phrogz]]_

<hr />

I create an application. Now I want to patch Column.human_name method to return translated parameter based on the language I want.

currently my code is like this.
<pre>
#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)
    if(lang.nil? or lang = 'en')
      return __human_name
    else
      return Translation.find_first ["lang=? AND context=?", lang, name].translated_text
    end
  end
end
</pre>

The problem is I don't know where to put this. code in.

I want the file to be automatically load as soon as the system start. And it should not be loaded twice because it will result in stack overflow of recursive calls. Could anyone help?

By the way, could anyone clarify for me:
1. In rails 0.10.1, there is new directory /app/apis. What is this directroy for.
2. Does all files put in /lib/ get automatically load when application start? Or is it only that the load path is appended?
* _the load path is modified; files are not automatically included -- [[Phrogz]]_
