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: 3ce3b788d08cf1e5da00e035786e857dc991ff53
4
- data.tar.gz: a99f443b22367166c3b196aae31ae14eeddf5ed0
3
+ metadata.gz: cf763f2c1c40bd80b9079c1a92275da20a8c69fc
4
+ data.tar.gz: 30a1b77e3c3b17ffbd35ec7cafdc23ef38f371b0
5
5
  SHA512:
6
- metadata.gz: 58ad98059a2028dc803f3d261c8e88f0bf9e359e4cb59f192c14c377fb9905b2fe866ea437ecce2e43744c1b821236ae831b34a72c60f6f38d401835530fdf79
7
- data.tar.gz: 8ae9e4ac753e99cfafb0ecdf04646926203ff402eb93c98d3111992a688ffd1cb58ec9599fca449fda846ef47d55b13c5dbc11938076f42a401095187b88db6c
6
+ metadata.gz: 100f29d33c7bbd8d255121be3af69b115db0eae9cc939edef033b672aaf9e021bc0c70ced13823b2860c1a754388d2b3941e40d49c1ca76cc6d346baa5d2700d
7
+ data.tar.gz: da97d4d3e1f1253439bf05ca6a53357d16b0efdc4636e9baf59a7c6089c081722a713ef27d7f683ceb4171be5396bc8b7b9d3e3b7d846e62a58e5660be07a126
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'awesome_form_attributes'
5
- s.version = '1.2.2'
5
+ s.version = '1.2.3'
6
6
  s.authors = ['Zhimeng Sun']
7
7
  s.email = ['zhimengSun@gmail.com']
8
8
  s.homepage = 'https://github.com/zhimengSun/awesome_form_attributes'
@@ -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 :file_words
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 :file_reg
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.file_words = %w(文件)
39
+ config.file_field_words = %w(文件)
40
40
  class << config
41
- %w(text_area select boolean file).each do |c|
41
+ %w(text_area select boolean file_field).each do |c|
42
42
  define_method(:"#{c}_reg") do
43
- /#{config.send(:"#{c}_words").join("|")}/
43
+ /#{config.send(:"#{c}_words").join("|")}/
44
44
  end
45
45
  end
46
46
  end
@@ -13,7 +13,7 @@ module UsedAttrColumns
13
13
  end
14
14
 
15
15
  def select_values(tag, obj = nil)
16
- select_options[tag.to_s] || []
16
+ select_options[tag] || select_options[tag.to_s] || []
17
17
  end
18
18
 
19
19
  def short_used_attrs
@@ -4,5 +4,5 @@ AwesomeFormAttributes.configure do |config|
4
4
  # config.text_area_words += []
5
5
  # config.select_words += []
6
6
  # config.boolean_words += []
7
- # config.file_words += []
7
+ # config.file_field_words += []
8
8
  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.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-20 00:00:00.000000000 Z
11
+ date: 2016-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails