def t_belongs_to(name, options={})
      extend(Associations::BelongsTo::ClassMethods)
      association = _t_create_association(:t_belongs_to, name, options)
      initialize_belongs_to_association(association)

      define_method(association.name) do |*params|
        get_associate(association, params) do
          belongs_to_associate(association)
        end
      end

      define_method("#{association.name}=") do |associate|
        set_associate(association, associate) do
          set_belongs_to_associate(association, associate)
        end
      end
    end
def t_belongs_to(name, options={})
      extend(Associations::BelongsTo::ClassMethods)
      association = _t_create_association(:t_belongs_to, name, options)
      initialize_belongs_to_association(association)

      define_method(association.name) do |*params|
        get_associate(association, params) do
          belongs_to_associate(association)
        end
      end

      define_method("#{association.name}=") do |associate|
        set_associate(association, associate) do
          set_belongs_to_associate(association, associate)
        end
      end
    end
Specifies a one-to-one association with another class. This method should only be used
 if this class contains the foreign key. If the other class contains the foreign key,
 then you should use +t_has_one+ instead.

 Methods will be added for retrieval and query for a single associated object, for which
 this object holds an id:

 [association(force_reload = false)]
   Returns the associated object. +nil+ is returned if none is found.
 [association=(associate)]
   Assigns the associate object, extracts the primary key, and sets it as the foreign key.

 (+association+ is replaced with the symbol passed as the first argument, so
 <tt>t_belongs_to :author</tt> would add among others <tt>author.nil?</tt>.)

 === Example

 A Post class declares <tt>t_belongs_to :author</tt>, which will add:
 * <tt>Post#author</tt> (similar to <tt>Author.find(author_id)</tt>)
 * <tt>Post#author=(author)</tt> (similar to <tt>post.author_id = author.id</tt>)

 === Supported options
 [:class_name]
   Specify the class name of the association. Use it only if that name can't be inferred
   from the association name. So <tt>t_belongs_to :manager</tt> will by default be linked to the Manager class, but
   if the real class name is Person, you'll have to specify it with this option.
 [:foreign_key]
   Specify the foreign key used for the association. By default this is guessed to be the name
   of the association with an "_id" suffix. So a class that defines a <tt>t_belongs_to :person</tt>
   association will use "person_id" as the default <tt>:foreign_key</tt>. Similarly,
   <tt>t_belongs_to :favorite_person, :class_name => "Person"</tt> will use a foreign key
   of "favorite_person_id".
 [:dependent]
   If set to <tt>:destroy</tt>, the associated object is deleted when this object is, calling all delete
   callbacks.  If set to <tt>:delete</tt>, the associated object is deleted *without* calling any of
   its delete callbacks.  This option should not be specified when <tt>t_belongs_to</tt> is used in
   conjuction with a <tt>t_has_many</tt> relationship on another class because of the potential
   to leave orphaned records behind.
 [:readonly]
   If true, the associated object is readonly through the association.
 [:autosave]
   If true, always save the associated object or destroy it if marked for destruction, when saving the parent object. Off by default.
 [:polymorphic]
   Specify this association is a polymorphic association by passing +true+. (*Note*: IDs for polymorphic associations are always
   stored as strings in the database.)
 [:disable_foreign_key_constraints]
   If true, bypass foreign key constraints, like verifying the target object exists when the relationship is created.
   Defaults to false.

 Option examples:
   t_belongs_to :project_manager, :class_name => "Person"
   t_belongs_to :valid_coupon, :class_name => "Coupon", :foreign_key => "coupon_id"
   t_belongs_to :project, :readonly => true
   t_belongs_to :attachable, :polymorphic => true