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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cbba39712b7aace911121f61c465a5180dd8ad4f
4
- data.tar.gz: 0017b27689dc7349d19526a6fec05f68f06d122f
3
+ metadata.gz: bd5e2fd3d6bcb1aa59b34443a3572595d88fded8
4
+ data.tar.gz: 62bab45776d59b0edcf280e9c95741ba1b928a0e
5
5
  SHA512:
6
- metadata.gz: 807839462020c4818f076db6a40a43942f389ae83f364837ecd6656eb8963cbd51d793dd145092aca38379832f22e6e7e72a263864db8d4e037579f49a998555
7
- data.tar.gz: 81938e9707dda8ede9340616cc97938c899693dbf6be266661ec4a32649e4cd4ca3965356775f7ef4e87f34419a37900c26bbdcd8a109f9dae2b0cff2b04e488
6
+ metadata.gz: 87bf99df36c8f80cb6ccc2e25f65cd1db8a66a714282ebf1fc55e6d8fa1698c1599dc08c4bddee5f9be9686c1cc28369bc5f12e396f0ff4df3ca12d3502fe121
7
+ data.tar.gz: cc1a52afc096c595915c3f0e8bc0b78d8455d08a90cf3806b001f7e910ec7f1fa4c843f8287c6a5437876fa315585d0c15cccae687587a0962662a2521c722d4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- we_bridge-auto_view_helper (0.0.8)
4
+ we_bridge-auto_view_helper (0.0.10)
5
5
  actionview
6
6
  actionview-helpers-auto_tag_helper
7
7
  activerecord-mlang
@@ -55,7 +55,8 @@ module WeBridge
55
55
  # PATCH/PUT /???s/1
56
56
  def update
57
57
  @record.class.transaction do
58
- @record.update!(record_params)
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
@@ -1,5 +1,5 @@
1
1
  module WeBridge
2
2
  module AutoViewHelper
3
- VERSION = "0.0.9"
3
+ VERSION = "0.0.10"
4
4
  end
5
5
  end
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.9
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-10 00:00:00.000000000 Z
11
+ date: 2015-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview