def model_for (path)
      reflection = reflection_for(path)

      if Authorization.is_a_association_proxy?(reflection)
        if Rails.version < "3.2"
          reflection.proxy_reflection.klass
        else
          reflection.proxy_association.reflection.klass
        end
      elsif reflection.respond_to?(:klass)
        reflection.klass
      else
        reflection
      end
    end
def model_for (path)
      reflection = reflection_for(path)

      if Authorization.is_a_association_proxy?(reflection)
        if Rails.version < "3.2"
          reflection.proxy_reflection.klass
        else
          reflection.proxy_association.reflection.klass
        end
      elsif reflection.respond_to?(:klass)
        reflection.klass
      else
        reflection
      end
    end
Returns the model associated with the given path.