def loaded?
      if model.respond_to?(:loaded?)
        # There is a model and it is loaded
        return model.loaded?
      elsif last_promise || model.is_a?(Promise)
        # The model is a promise or is resolving
        return false
      else
        # Otherwise, its loaded
        return true
      end
    end
def loaded?
      if model.respond_to?(:loaded?)
        # There is a model and it is loaded
        return model.loaded?
      elsif last_promise || model.is_a?(Promise)
        # The model is a promise or is resolving
        return false
      else
        # Otherwise, its loaded
        return true
      end
    end
loaded? is a quick way to see if the model for the controller is loaded
 yet.  If the model is there, it asks the model if its loaded.  If the model
 was set to a promise, it waits for the promise to resolve.