Skip to content

Commit

Permalink
IIIF #5 - Updating resource-api gem to v0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dleadbetter committed Jul 18, 2022
1 parent 8d84687 commit df9d302
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ gem 'pagy', '~> 5.10'
gem 'rack-cors'

# Resource API
gem 'resource_api', git: 'https://github.com/performant-software/resource-api.git', tag: 'v0.4.1'
gem 'resource_api', git: 'https://github.com/performant-software/resource-api.git', tag: 'v0.4.2'

# Use Json Web Token (JWT) for token based authentication
gem 'jwt'
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ GIT

GIT
remote: https://github.com/performant-software/resource-api.git
revision: fee23a1eacd9fda1d5c4dcaed15a941e12cc214c
tag: v0.4.1
revision: f1de1653b67fc1d623d7418e92d3bb3134df800e
tag: v0.4.2
specs:
resource_api (0.1.0)
pagy (~> 5.10)
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/api/resources_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ class Api::ResourcesController < Api::BaseController
before_action :validate_new_resource, unless: -> { current_user.admin? }, only: :create
before_action :validate_resource, unless: -> { current_user.admin? }, only: [:update, :destroy]

protected

def base_query
subquery = Project.where(Project.arel_table[:id].eq(Resource.arel_table[:project_id]))

Expand Down

0 comments on commit df9d302

Please sign in to comment.