active_admin_versioning 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e4ca09c85b2c372d0f4d4b307f0faeb089b1eea5
4
- data.tar.gz: b5d015db0abfc823104f4224ab5127b9abde1277
3
+ metadata.gz: 39f10e57332f28066ce493ca546d6ca9da6c167b
4
+ data.tar.gz: 57ce8e063641a9a0ea3b88d9b6c24cd4a2ee3bfd
5
5
  SHA512:
6
- metadata.gz: 9c7044067bf8401565195fe294fc49c4be0813063697db71b84798cec7dfc46eec77cb46e7b5abaa320c865bc6549f5391c7bf3c5b9a6625b7b5fb06b8d528dc
7
- data.tar.gz: b6af1cd6dfe53993442e9e671d082cee84c41d5ac4921865da5e0773f5888b5bfab4e77a09c7b6d58344a9a0e4b0fad99870cc6b5497bfe2156c39f3b30aea58
6
+ metadata.gz: bd97dcf297f493247f18ea5afad3e687aea38e826d66259de5346c7b6d3709041cec22a57f5df141dedc94f7f9ebf0d9aeb97a7a8329af77b6d3621aa5f5570a
7
+ data.tar.gz: ecdfd7fe1f04e5dc59d991c2abdb161b6dfa512a8712fa42ab7f51e613059c63756d495a1d3954e6491d2379331c9df742045a34574465f6c5808226cad445c6
@@ -9,7 +9,9 @@ module ActiveAdminVersioning
9
9
  page = params[:page].to_i
10
10
  @versions = resource.versions.reorder(id: :desc, created_at: :desc).page(params[:page]).per(1)
11
11
  @version_number = page > 0 ? @versions.total_count - (page - 1) : @versions.total_count
12
- set_resource_ivar(@versions[0].reify) if @versions.present?
12
+ if @versions.any? && @versions[0].next.present?
13
+ set_resource_ivar(@versions[0].next.reify)
14
+ end
13
15
  show!
14
16
  end
15
17
 
@@ -1,3 +1,3 @@
1
1
  module ActiveAdminVersioning
2
- VERSION = "0.2.0".freeze
2
+ VERSION = "0.2.1".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_admin_versioning
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshiyuki Hirano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-24 00:00:00.000000000 Z
11
+ date: 2016-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeadmin