lib/trust/controller/resource.rb
def load
        if new_action?
#         logger.debug "Trust.load: Setting new: class: #{klass} strong_params: #{strong_params.inspect}"
          self.instance ||= relation.new(strong_params)
          @controller.send(:build, action) if @controller.respond_to?(:build, true)
        elsif properties.member_actions.include?(action)
#          logger.debug "Trust.load: Finding parent: #{parent.inspect}, relation: #{relation.inspect}"
          self.instance ||= relation.find(params[:id] || params["#{relation.name.underscore}_id".to_sym])
          @controller.send(:build, action) if @controller.respond_to?(:build,true)
        else # other outcome would be collection actions
#          logger.debug "Trust.load: Parent is: #{parent.inspect}, collection or unknown action."
        end
      end
# Loads the resource
#
# See Trust::Controller::Properties which controls the behavior of this method.
#
# It will normally find the instance variable for existing object or initialize them as new.
# If using nested resources and +belongs_to+ has been declared in the controller it will use the
# parent relation if found.
Loads the resource
See Trust::Controller::Properties which controls the behavior of this method.

It will normally find the instance variable for existing object or initialize them as new.
If using nested resources and +belongs_to+ has been declared in the controller it will use the
parent relation if found.
Loads the resource See Trust :: Controller :: Properties which controls the behavior of this method . It will normally find the instance variable for existing object or initialize them as new . If using nested resources and + belongs_to + has been declared in the controller it will use the parent relation if found .
def load
        if new_action?
          self.instance ||= relation.new(strong_params)
          @controller.send(:build, action) if @controller.respond_to?(:build, true)
        elsif properties.member_actions.include?(action)
          self.instance ||= relation.find(params[:id] || params["#{relation.name.underscore}_id".to_sym])
          @controller.send(:build, action) if @controller.respond_to?(:build,true)
        else 
        end
      end
def load if new_action? self . instance ||= relation . new ( strong_params ) @controller . send ( :build , action ) if @controller . respond_to? ( :build , true ) elsif properties . member_actions . include? ( action ) self . instance ||= relation . find ( params [ :id ] || params [ "#{relation.name.underscore}_id" . to_sym ] ) @controller . send ( :build , action ) if @controller . respond_to? ( :build , true ) else end end
Loads the resource
See Trust::Controller::Properties which controls the behavior of this method.
Loads the resource See Trust :: Controller :: Properties which controls the behavior of this method .
#         logger.debug "Trust.load: Setting new: class: #{klass} strong_params: #{strong_params.inspect}" #          logger.debug "Trust.load: Finding parent: #{parent.inspect}, relation: #{relation.inspect}" # other outcome would be collection actions #          logger.debug "Trust.load: Parent is: #{parent.inspect}, collection or unknown action."