lib/trust/controller/properties.rb
def belongs_to(*resources)
        raise ArgumentError, "You must specify at least one resource after belongs_to" unless resources
        logger.debug "#{@model} belongs_to #{resources.inspect}"
        options = resources.extract_options!
        resources.each do |resource|
          @associations[resource] = options[:as]
        end
      end
# Specify associated resources (nested resources)
#
# === Example
#
#   +belongs_to+ :lottery
#   +belongs_to+ :table, :card_game
#   +belongs_to+ :card_game, :as => :bridge
#
Specify associated resources (nested resources)
Example


Specify associated resources ( nested resources ) Example
def belongs_to(*resources)
        raise ArgumentError, "You must specify at least one resource after belongs_to" unless resources
        logger.debug "#{@model} belongs_to #{resources.inspect}"
        options = resources.extract_options!
        resources.each do |resource|
          @associations[resource] = options[:as]
        end
      end
def belongs_to ( * resources ) raise ArgumentError , "You must specify at least one resource after belongs_to" unless resources logger . debug "#{@model} belongs_to #{resources.inspect}" options = resources . extract_options! resources . each do | resource | @associations [ resource ] = options [ :as ] end end
Specify associated resources (nested resources)
 Example
Specify associated resources ( nested resources ) Example
resources