Skip to content

Commit

Permalink
Merge pull request #590 from ouranos/feature/fix-pagination-params
Browse files Browse the repository at this point in the history
JsonApiClient fixes for 1.5.3
  • Loading branch information
BrunoChauvet authored Nov 27, 2017
2 parents 74f2f78 + 4feb8ed commit 230bbf2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
7 changes: 2 additions & 5 deletions core/app/models/mno_enterprise/base_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,8 @@ def update!(attrs = {})
end

def destroy!
unless destroy
# HotFix waiting for #https://github.com/chingor13/json_api_client/pull/275 to be merged
collect_errors(last_result_set.errors)
raise_if_errors
end
destroy
raise_if_errors
end

def collect_errors(external_errors)
Expand Down
3 changes: 3 additions & 0 deletions core/config/initializers/json_api_client.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Configure pagination params
JsonApiClient::Paginating::Paginator.page_param = 'number'
JsonApiClient::Paginating::Paginator.per_page_param = 'size'
2 changes: 1 addition & 1 deletion core/mno-enterprise-core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Gem::Specification.new do |s|

s.add_dependency 'rails', '~> 4.2', '>= 4.2.0'
s.add_dependency 'httparty', '~> 0.11'
s.add_dependency 'json_api_client', '~> 1.5.2'
s.add_dependency 'json_api_client', '~> 1.5.3'
s.add_dependency 'countries', '~> 1.2.5'
s.add_dependency 'jwt', '~> 1.4'
s.add_dependency 'deepstruct', '~> 0.0.7'
Expand Down

0 comments on commit 230bbf2

Please sign in to comment.