16470: File updates & additions from 'rake rails:update'
[arvados.git] / services / api / app / controllers / application_controller.rb
index c7d7ad8148246f883d87b37840da5ed3610946d1..2644a06579787082d8e1c7421a5288a085450684 100644 (file)
@@ -63,7 +63,6 @@ class ApplicationController < ActionController::Base
                 :with => :render_error)
     rescue_from(ActiveRecord::RecordNotFound,
                 ActionController::RoutingError,
-                ActionController::UnknownController,
                 AbstractController::ActionNotFound,
                 :with => :render_not_found)
   end
@@ -361,7 +360,7 @@ class ApplicationController < ActionController::Base
     %w(created_at modified_by_client_uuid modified_by_user_uuid modified_at).each do |x|
       @attrs.delete x.to_sym
     end
-    @attrs = @attrs.symbolize_keys if @attrs.is_a? HashWithIndifferentAccess
+    @attrs = @attrs.symbolize_keys if @attrs.is_a? ActiveSupport::HashWithIndifferentAccess
     @attrs
   end
 
@@ -386,8 +385,8 @@ class ApplicationController < ActionController::Base
       @read_auths += ApiClientAuthorization
         .includes(:user)
         .where('api_token IN (?) AND
-                (expires_at IS NULL OR expires_at > CURRENT_TIMESTAMP AT TIME ZONE ?)',
-               secrets, 'UTC')
+                (expires_at IS NULL OR expires_at > CURRENT_TIMESTAMP)',
+               secrets)
         .to_a
     end
     @read_auths.select! { |auth| auth.scopes_allow_request? request }