we_bridge-auto_view_helper 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/we_bridge/auto_view_helper/controller.rb +3 -2
- data/lib/we_bridge/auto_view_helper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd5e2fd3d6bcb1aa59b34443a3572595d88fded8
|
4
|
+
data.tar.gz: 62bab45776d59b0edcf280e9c95741ba1b928a0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87bf99df36c8f80cb6ccc2e25f65cd1db8a66a714282ebf1fc55e6d8fa1698c1599dc08c4bddee5f9be9686c1cc28369bc5f12e396f0ff4df3ca12d3502fe121
|
7
|
+
data.tar.gz: cc1a52afc096c595915c3f0e8bc0b78d8455d08a90cf3806b001f7e910ec7f1fa4c843f8287c6a5437876fa315585d0c15cccae687587a0962662a2521c722d4
|
data/Gemfile.lock
CHANGED
@@ -55,7 +55,8 @@ module WeBridge
|
|
55
55
|
# PATCH/PUT /???s/1
|
56
56
|
def update
|
57
57
|
@record.class.transaction do
|
58
|
-
|
58
|
+
p = record_params
|
59
|
+
@record.update!(p) if p.present?
|
59
60
|
record_text_params.try :each do |code,text_params|
|
60
61
|
text = @record.text(code)
|
61
62
|
text.attributes = text_params
|
@@ -85,7 +86,7 @@ module WeBridge
|
|
85
86
|
# Only allow a trusted parameter "white list" through.
|
86
87
|
def record_params
|
87
88
|
column_names = self.class.model.try(:editable_columns) || self.class.model.content_columns.map(&:name)
|
88
|
-
params.require(self.class.model.table_name).permit(*column_names)
|
89
|
+
column_names.empty? ? {} : params.require(self.class.model.table_name).permit(*column_names)
|
89
90
|
end
|
90
91
|
|
91
92
|
def record_text_params
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: we_bridge-auto_view_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shinjiro Itagaki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionview
|