app/controllers/runs_controller.rb
# find entity object and set as @entity
find entity object and set as @entity
find entity object and set as @entity
def find_entity(*args)
    (@current_user && params["id"] && params["id"].to_s == "0") and return @entity = @current_user
    if args.blank? || args.first.is_a?(Hash)   
      entity_id = (@entity_id  || params[:id])
    else
      entity_id = args.shift                   
    end 
    @entity = Run.find_entity(entity_id, *args)
  end
def find_entity ( * args ) ( @current_user && params [ "id" ] && params [ "id" ] . to_s == "0" ) and return @entity = @current_user if args . blank? || args . first . is_a? ( Hash ) entity_id = ( @entity_id || params [ :id ] ) else entity_id = args . shift end @entity = Run . find_entity ( entity_id , * args ) end
find entity object and set as @entity
find entity object and set as @entity
# special case for current_user # entity_id is in the form "id:Model" # default case to follow show action # entity_id explicitly given
args
<not_specific>