From 174a7265660e29757927f1d95a4791a369d3d27d Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Wed, 15 Mar 2017 12:38:35 -0500 Subject: [PATCH] Return a HWIA in rails 4 --- app/controllers/riiif/images_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/riiif/images_controller.rb b/app/controllers/riiif/images_controller.rb index 90bd833..7de1c05 100644 --- a/app/controllers/riiif/images_controller.rb +++ b/app/controllers/riiif/images_controller.rb @@ -59,7 +59,9 @@ def image_id ## # @return [ActiveSupport::HashWithIndifferentAccess] def image_request_params - params.permit(:region, :size, :rotation, :quality, :format).to_h + result = params.permit(:region, :size, :rotation, :quality, :format).to_h + return result.with_indifferent_access if Rails.version < '5' + result end def authorization_service