rails_admin_history_rollback 0.0.8 → 0.0.9

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: e814e80efdeb1a7c88fb30050abf3ea0c392250f
4
- data.tar.gz: f68a567035e61912f498f30e5f12a8d716b8dd37
3
+ metadata.gz: ad8e01d385fb4babfe7299bc0c4798a61380744e
4
+ data.tar.gz: 639f8de8cf6e082ca0ae3918d2b50480f07c54e8
5
5
  SHA512:
6
- metadata.gz: 3fb12ddab25b3e85bd9dad1f3fd05e9b7e01d298f42ca724ab648ec919fc97aa0e03a4e445d5611a9130d92920cdc912710575cf8b9886e8d885b5576736c0da
7
- data.tar.gz: 94a8d7051dd5393eeb333f11e63a5430812ff3aaec1e2575bd6176718d2e3f1716bf13f7b1ef6a07e8cc09d53a420af34e147431b3701784d7402b5569209fe4
6
+ metadata.gz: d335aba686497911a92e333a7a84a66f33408427ce7f7b0308c26499ce0dd53fe9e4518e2ce1b13cdb28cb4ed26be27463b5238731ffa3dc515aaaa094339dce
7
+ data.tar.gz: b36f963ac72e08ba4ed501b1773b025772793d40f32cdc1089e66c423ab893ac670a9a9d6942497eebecb5e245155c2143701b155ece63281009382b4e544908
@@ -12,3 +12,4 @@ en:
12
12
  rollback_success: "Rolled back changes to this record."
13
13
  rollback_impossible: "Couldn't rollback. Sorry."
14
14
  version_not_found: "Version does not exist."
15
+ rollback_violates_foreign_key: "Couldn't rollback: this model links to another model, which doesn't exists."
@@ -12,3 +12,4 @@ ru:
12
12
  rollback_success: "Изменения данной версии восстановлены."
13
13
  rollback_impossible: "Невозможно восстановить. Извините."
14
14
  version_not_found: "Данная версия не существует."
15
+ rollback_violates_foreign_key: "Невозможно восстановить: эта модель ссылается на другую модель, которой не существует."
@@ -8,3 +8,8 @@ zh_cn:
8
8
  field: "字段"
9
9
  rollback: "还原"
10
10
  view_changes: "查看"
11
+ rollback_destroy: "Rolled back newly-created record by destroying it."
12
+ rollback_success: "Rolled back changes to this record."
13
+ rollback_impossible: "Couldn't rollback. Sorry."
14
+ version_not_found: "Version does not exist."
15
+ rollback_violates_foreign_key: "Couldn't rollback: this model links to another model, which doesn't exists."
@@ -56,6 +56,8 @@ module RailsAdmin
56
56
  rescue ActiveRecord::RecordNotFound
57
57
  flash[:error] = t 'admin.history_rollback.version_not_found'
58
58
  redirect_to :action => :history_index
59
+ rescue ActiveRecord::InvalidForeignKey
60
+ flash[:error] = t 'admin.history_rollback.rollback_violates_foreign_key'
59
61
  end
60
62
 
61
63
  redirect_to :action => :history_index
@@ -9,9 +9,6 @@ module RailsAdmin
9
9
  @version.id
10
10
  end
11
11
  end
12
- class AuditingAdapter
13
- COLUMN_MAPPING[:rollback] = :id
14
- end
15
12
  end
16
13
  end
17
14
  end
@@ -1,3 +1,3 @@
1
1
  module RailsAdminHistoryRollback
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
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.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rikki Pitt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-09 00:00:00.000000000 Z
11
+ date: 2016-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails