# File lib/reactive_resource/association/belongs_to_association.rb, line 51
      def add_helper_methods(klass, attribute)
        association = self
        
        klass.class_eval do 
          # address.lawyer_id
          define_method("#{attribute}_id") do
            prefix_options["#{attribute}_id".intern]
            super()
          end
          
          # address.lawyer_id = 3
          define_method("#{attribute}_id=") do |value|
            prefix_options["#{attribute}_id".intern] = value
            super(value)
          end

          # address.lawyer
          define_method(attribute) do
            # if the parent has its own belongs_to associations, we need
            # to add those to the 'find' call. So, let's grab all of
            # these associations, turn them into a hash of :attr_name =>
            # attr_id, and fire off the find.
            
            unless instance_variable_get("@#{attribute}")
              object = association.resolve_relationship(self)
              instance_variable_set("@#{attribute}", object)
            end
            instance_variable_get("@#{attribute}")
          end
        end
        
        # Recurse through the parent object.
        associated_class.belongs_to_associations.each do |parent_attribute|
          parent_attribute.add_helper_methods(klass, parent_attribute.attribute)
        end
      end