dynamic_scaffold 1.5.0 → 1.6.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c38dbab86d238886a3fc797a81804715a0b4299473cda34cbee0878f6c17500e
|
4
|
+
data.tar.gz: 9a2c173022936a56a7d6af715d60c71accadf070c9d34698af8a2512c841ee07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93cc76ad613015794c0cdbb260e0d2e94c5246997bbadffa9d89c18839224439f7101ab6ccafa42b1e740aa57288888db93a8fa87ff1ea6430404606b773c537
|
7
|
+
data.tar.gz: 842c32cce00a22e526bb1db3f9adc5f017ec188e5b8fd2ec0a91c693e999fc5e46de3272b80884cad0b60c27138afe31e17faeb89477540f905cabcd8ed77a53
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%unless flash[:dynamic_scaffold_danger].nil? -%>
|
2
2
|
<div class="alert alert-danger" role="alert">
|
3
|
-
|
3
|
+
<%== flash[:dynamic_scaffold_danger] %>
|
4
4
|
</div>
|
5
5
|
<%end%>
|
6
6
|
<input type="hidden" class="authenticity_param_name" value="<%= request_forgery_protection_token %>">
|
@@ -77,7 +77,7 @@ module DynamicScaffold
|
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
80
|
-
def update # rubocop:disable Metrics/AbcSize
|
80
|
+
def update # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
81
81
|
values = update_values
|
82
82
|
@record = find_record(dynamic_scaffold.model.primary_key => params['id'])
|
83
83
|
datetime_select_keys = []
|
@@ -107,7 +107,7 @@ module DynamicScaffold
|
|
107
107
|
end
|
108
108
|
end
|
109
109
|
|
110
|
-
def destroy
|
110
|
+
def destroy # rubocop:disable Metrics/AbcSize
|
111
111
|
# `Destroy` also does not support multiple primary keys too.
|
112
112
|
record = find_record(dynamic_scaffold.model.primary_key => params['id'])
|
113
113
|
begin
|
@@ -122,6 +122,9 @@ module DynamicScaffold
|
|
122
122
|
flash[:dynamic_scaffold_danger] = I18n.t('dynamic_scaffold.alert.destroy.failed')
|
123
123
|
logger.error(e)
|
124
124
|
end
|
125
|
+
|
126
|
+
flash[:dynamic_scaffold_danger] = record.errors[:base].join('<br>') if record.errors[:base].any?
|
127
|
+
|
125
128
|
redirect_to dynamic_scaffold_path(:index, request_queries)
|
126
129
|
end
|
127
130
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamic_scaffold
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masamoto Miyata
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: classnames-rails-view
|