awesome_form_attributes 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cf763f2c1c40bd80b9079c1a92275da20a8c69fc
|
|
4
|
+
data.tar.gz: 30a1b77e3c3b17ffbd35ec7cafdc23ef38f371b0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 100f29d33c7bbd8d255121be3af69b115db0eae9cc939edef033b672aaf9e021bc0c70ced13823b2860c1a754388d2b3941e40d49c1ca76cc6d346baa5d2700d
|
|
7
|
+
data.tar.gz: da97d4d3e1f1253439bf05ca6a53357d16b0efdc4636e9baf59a7c6089c081722a713ef27d7f683ceb4171be5396bc8b7b9d3e3b7d846e62a58e5660be07a126
|
|
@@ -16,11 +16,11 @@ module AwesomeFormAttributes
|
|
|
16
16
|
config_accessor :text_area_words
|
|
17
17
|
config_accessor :select_words
|
|
18
18
|
config_accessor :boolean_words
|
|
19
|
-
config_accessor :
|
|
19
|
+
config_accessor :file_field_words
|
|
20
20
|
config_accessor :text_area_reg
|
|
21
21
|
config_accessor :select_reg
|
|
22
22
|
config_accessor :boolean_reg
|
|
23
|
-
config_accessor :
|
|
23
|
+
config_accessor :file_field_reg
|
|
24
24
|
|
|
25
25
|
def param_name
|
|
26
26
|
config.param_name.respond_to?(:call) ? config.param_name.call : config.param_name
|
|
@@ -36,11 +36,11 @@ module AwesomeFormAttributes
|
|
|
36
36
|
config.text_area_words = %w(描述 简介 介绍)
|
|
37
37
|
config.select_words = %w(select 类型)
|
|
38
38
|
config.boolean_words = %w(是否)
|
|
39
|
-
config.
|
|
39
|
+
config.file_field_words = %w(文件)
|
|
40
40
|
class << config
|
|
41
|
-
%w(text_area select boolean
|
|
41
|
+
%w(text_area select boolean file_field).each do |c|
|
|
42
42
|
define_method(:"#{c}_reg") do
|
|
43
|
-
|
|
43
|
+
/#{config.send(:"#{c}_words").join("|")}/
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: awesome_form_attributes
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zhimeng Sun
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-06-
|
|
11
|
+
date: 2016-06-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|