rails_admin_history_rollback 0.1.0 → 1.0.3

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
- SHA1:
3
- metadata.gz: 544e259df56dfd6b384325f65c4deeb938225967
4
- data.tar.gz: 36ccb25b8546825d7ee8476f4bdc9f2626e75904
2
+ SHA256:
3
+ metadata.gz: 1b0dd5280da0bff7de1f3adbb82f718acc5132b35822e42bac9135dae3d274f9
4
+ data.tar.gz: 71340110e80af1ab98cf97f083ca3bbe9415f265e91bc1e17f8cc2241acc90c9
5
5
  SHA512:
6
- metadata.gz: 10cff254edf4b302be8ce395fe6f24894400d866ec35b44ddfaa5ef4040e40e576112d17c931351c80e2d651bcd94714316c4a4c16ee6df8275d6f367cfdc20c
7
- data.tar.gz: 0bbcd549ad62b21aa7c3a3b8b4d63185962f7e26653382da2bfc6b2e267aff4bf1b96b07299d3e375cad679b5f353dea2eef676defb617f339d7ced2e94d0e4d
6
+ metadata.gz: c1b0f9fd9f2a0e4722dcf22db6834e26352506eb81bdb97c5bb76a00152aa95a9ddfcb884212304596b223968a8452d401f2e31099641051f230d275cb86be4d
7
+ data.tar.gz: b17b280d8046bf22bd9b464f5edf1dad026f05ab20393c69a2ec804ab26a4c90a30a28dbb982ed1029ee4793b87e9d3c804fb6ea5be9a21fdef927e3333c7251
@@ -15,7 +15,7 @@
15
15
  .input-group
16
16
  %input.form-control.input-small{name: "query", type: "search", value: query, placeholder: "#{t("admin.misc.filter")}", class: 'input-small'}
17
17
  %span.input-group-btn
18
- %button.btn.btn-primary{type: "submit", :'data-disable-with' => "<i class='icon-white icon-refresh'></i> ".html_safe + t("admin.misc.refresh")}
18
+ %button.btn.btn-primary{type: 'submit', :'data-disable-with' => '<i class="icon-white icon-refresh"></i> '.html_safe + t('admin.misc.refresh')}
19
19
  %i.icon-white.icon-refresh
20
20
  = t("admin.misc.refresh")
21
21
  %table#history.table.table-striped.table-condensed
@@ -0,0 +1,15 @@
1
+ pt-BR:
2
+ admin:
3
+ history_rollback:
4
+ cancel: "Cancelar"
5
+ confirm: "Deseja continuar?"
6
+ table_headers:
7
+ changes: "Mudanças"
8
+ field: "Campo"
9
+ rollback: "Desfazer mudanças"
10
+ view_changes: "Ver mudanças"
11
+ rollback_destroy: "Mudanças desfeitas no objeto recém criado. Objeto apagado."
12
+ rollback_success: "Mudanças desfeitas neste objeto."
13
+ rollback_impossible: "Não foi possível desfazer as mudanças."
14
+ version_not_found: "Versão não existe."
15
+ rollback_violates_foreign_key: "Não foi possível desfazer mudanças: este modelo está ligado a outro, que não existe."
@@ -24,7 +24,8 @@ module RailsAdmin
24
24
  proc do
25
25
  @general = true
26
26
  @history = @auditing_adapter && @auditing_adapter.listing_for_model(@abstract_model, params[:query], params[:sort], params[:sort_reverse], params[:all], params[:page]) || []
27
- @version = PaperTrail::Version.find(params[:version_id]) if params[:version_id] rescue false
27
+ version_class = @abstract_model.model.paper_trail_options.dig(:versions, :class_name).try(:constantize) || ::PaperTrail::Version
28
+ @version = version_class.find(params[:version_id]) if params[:version_id] rescue false
28
29
 
29
30
  if request.get? # SHOW
30
31
 
@@ -1,3 +1,3 @@
1
1
  module RailsAdminHistoryRollback
2
- VERSION = "0.1.0"
2
+ VERSION = "1.0.3".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin_history_rollback
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rikki Pitt
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-22 00:00:00.000000000 Z
11
+ date: 2021-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -72,6 +72,7 @@ files:
72
72
  - config/locales/history_rollback.en.yml
73
73
  - config/locales/history_rollback.ru.yml
74
74
  - config/locales/history_rollback.zh_cn.yml
75
+ - config/locales/pt-BR.yml
75
76
  - lib/rails_admin_history_rollback.rb
76
77
  - lib/rails_admin_history_rollback/config/actions/history_index.rb
77
78
  - lib/rails_admin_history_rollback/engine.rb
@@ -81,7 +82,7 @@ homepage: https://github.com/rikkipitt/rails_admin_history_rollback
81
82
  licenses:
82
83
  - MIT
83
84
  metadata: {}
84
- post_install_message:
85
+ post_install_message:
85
86
  rdoc_options: []
86
87
  require_paths:
87
88
  - lib
@@ -96,9 +97,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
97
  - !ruby/object:Gem::Version
97
98
  version: '0'
98
99
  requirements: []
99
- rubyforge_project:
100
- rubygems_version: 2.6.4
101
- signing_key:
100
+ rubygems_version: 3.1.2
101
+ signing_key:
102
102
  specification_version: 4
103
103
  summary: History rollback with paper_trail for rails_admin
104
104
  test_files: []