simple_form_helpers 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f2abd7f5e14a1566ca4b20b90145f4d45c80f04c
4
+ data.tar.gz: fee1e0aa02669b1079c999e15664883e7dac1e86
5
+ SHA512:
6
+ metadata.gz: d336d6ee3e0f46eb19537c56a6db0f311f5270f4d84751d185831d0b6934e777974bb21d43b7c16e584cd701e002b8f463c9c1d17ebcc9e76758336c2d47065f
7
+ data.tar.gz: 449af4c1669e26e4c6b83a3cea659e38ddce28ae7198b2ac60d74225fbd984052ad2c93ab4b7988404b7acb5f497a3aa7b2fcc6be753a98e7c129c40dd7468b6
@@ -1,6 +1,6 @@
1
1
  module SimpleFormHelpers
2
2
  module FormBuilderExtensions
3
- def collection_check_boxes(attribute_name, model_or_scope, display_attribute_name)
3
+ def collection_check_boxes(attribute_name, model_or_scope, id_attribute_name, display_attribute_name)
4
4
  html_name = "#{self.object_name}[#{attribute_name}][]"
5
5
 
6
6
  current_item_ids = self.object.send(attribute_name)
@@ -14,8 +14,10 @@ module SimpleFormHelpers
14
14
  html1 = '' <<
15
15
  @template.hidden_field_tag(html_name) << "\n" <<
16
16
  (scope.collect do |item|
17
+ item_id = item.send(id_attribute_name)
18
+ item_display = item.send(display_attribute_name)
19
+
17
20
  html_id = @template.dom_id(item)
18
- item_id = item.id
19
21
  html2 = '' <<
20
22
  ' ' <<
21
23
  @template.check_box_tag(
@@ -25,7 +27,7 @@ module SimpleFormHelpers
25
27
  id: html_id
26
28
  ) << "\n" <<
27
29
  ' ' <<
28
- @template.label_tag(html_id, item.send(display_attribute_name)) <<
30
+ @template.label_tag(html_id, item_display) <<
29
31
  '<br/>' << "\n"
30
32
  end).join
31
33
  html1.html_safe
@@ -1,3 +1,3 @@
1
1
  module SimpleFormHelpers
2
- VERSION = "0.0.1"
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_form_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
5
- prerelease:
4
+ version: 0.0.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Richard Cook
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-06-10 00:00:00.000000000 Z
11
+ date: 2014-06-12 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rails
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,17 +27,15 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: sqlite3
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  description: Simple Rails 3.x form helpers
@@ -49,106 +44,95 @@ executables: []
49
44
  extensions: []
50
45
  extra_rdoc_files: []
51
46
  files:
52
- - lib/tasks/simple_form_helpers_tasks.rake
53
- - lib/simple_form_helpers/form_builder_extensions.rb
54
- - lib/simple_form_helpers/version.rb
55
47
  - lib/simple_form_helpers.rb
48
+ - lib/simple_form_helpers/version.rb
49
+ - lib/simple_form_helpers/form_builder_extensions.rb
50
+ - lib/tasks/simple_form_helpers_tasks.rake
56
51
  - LICENSE
57
52
  - Rakefile
58
53
  - README.md
59
- - test/simple_form_helpers_test.rb
60
54
  - test/test_helper.rb
61
- - test/dummy/config.ru
62
- - test/dummy/log/test.log
63
- - test/dummy/app/assets/javascripts/application.js
64
- - test/dummy/app/assets/stylesheets/application.css
65
- - test/dummy/app/views/layouts/application.html.erb
66
- - test/dummy/app/controllers/application_controller.rb
67
- - test/dummy/app/helpers/application_helper.rb
55
+ - test/simple_form_helpers_test.rb
56
+ - test/dummy/public/500.html
57
+ - test/dummy/public/404.html
58
+ - test/dummy/public/422.html
59
+ - test/dummy/public/favicon.ico
60
+ - test/dummy/README.rdoc
68
61
  - test/dummy/script/rails
69
- - test/dummy/config/database.yml
70
- - test/dummy/config/initializers/mime_types.rb
71
- - test/dummy/config/initializers/secret_token.rb
72
- - test/dummy/config/initializers/session_store.rb
73
- - test/dummy/config/initializers/inflections.rb
74
- - test/dummy/config/initializers/backtrace_silencers.rb
75
- - test/dummy/config/initializers/wrap_parameters.rb
76
- - test/dummy/config/routes.rb
77
- - test/dummy/config/application.rb
78
62
  - test/dummy/config/locales/en.yml
63
+ - test/dummy/config/environment.rb
79
64
  - test/dummy/config/environments/development.rb
80
65
  - test/dummy/config/environments/production.rb
81
66
  - test/dummy/config/environments/test.rb
67
+ - test/dummy/config/routes.rb
68
+ - test/dummy/config/initializers/inflections.rb
69
+ - test/dummy/config/initializers/wrap_parameters.rb
70
+ - test/dummy/config/initializers/mime_types.rb
71
+ - test/dummy/config/initializers/secret_token.rb
72
+ - test/dummy/config/initializers/session_store.rb
73
+ - test/dummy/config/initializers/backtrace_silencers.rb
74
+ - test/dummy/config/database.yml
82
75
  - test/dummy/config/boot.rb
83
- - test/dummy/config/environment.rb
76
+ - test/dummy/config/application.rb
77
+ - test/dummy/app/views/layouts/application.html.erb
78
+ - test/dummy/app/assets/javascripts/application.js
79
+ - test/dummy/app/assets/stylesheets/application.css
80
+ - test/dummy/app/controllers/application_controller.rb
81
+ - test/dummy/app/helpers/application_helper.rb
82
+ - test/dummy/config.ru
84
83
  - test/dummy/Rakefile
85
- - test/dummy/README.rdoc
86
- - test/dummy/db/test.sqlite3
87
- - test/dummy/public/422.html
88
- - test/dummy/public/favicon.ico
89
- - test/dummy/public/404.html
90
- - test/dummy/public/500.html
91
84
  homepage: https://github.com/rcook/simple_form_helpers
92
85
  licenses:
93
86
  - MIT
87
+ metadata: {}
94
88
  post_install_message:
95
89
  rdoc_options: []
96
90
  require_paths:
97
91
  - lib
98
92
  required_ruby_version: !ruby/object:Gem::Requirement
99
- none: false
100
93
  requirements:
101
- - - ! '>='
94
+ - - '>='
102
95
  - !ruby/object:Gem::Version
103
96
  version: '0'
104
- segments:
105
- - 0
106
- hash: 4575173503606126984
107
97
  required_rubygems_version: !ruby/object:Gem::Requirement
108
- none: false
109
98
  requirements:
110
- - - ! '>='
99
+ - - '>='
111
100
  - !ruby/object:Gem::Version
112
101
  version: '0'
113
- segments:
114
- - 0
115
- hash: 4575173503606126984
116
102
  requirements: []
117
103
  rubyforge_project:
118
- rubygems_version: 1.8.23
104
+ rubygems_version: 2.0.14
119
105
  signing_key:
120
- specification_version: 3
106
+ specification_version: 4
121
107
  summary: SimpleFormHelpers
122
108
  test_files:
123
- - test/simple_form_helpers_test.rb
124
109
  - test/test_helper.rb
125
- - test/dummy/config.ru
126
- - test/dummy/log/test.log
127
- - test/dummy/app/assets/javascripts/application.js
128
- - test/dummy/app/assets/stylesheets/application.css
129
- - test/dummy/app/views/layouts/application.html.erb
130
- - test/dummy/app/controllers/application_controller.rb
131
- - test/dummy/app/helpers/application_helper.rb
110
+ - test/simple_form_helpers_test.rb
111
+ - test/dummy/public/500.html
112
+ - test/dummy/public/404.html
113
+ - test/dummy/public/422.html
114
+ - test/dummy/public/favicon.ico
115
+ - test/dummy/README.rdoc
132
116
  - test/dummy/script/rails
133
- - test/dummy/config/database.yml
134
- - test/dummy/config/initializers/mime_types.rb
135
- - test/dummy/config/initializers/secret_token.rb
136
- - test/dummy/config/initializers/session_store.rb
137
- - test/dummy/config/initializers/inflections.rb
138
- - test/dummy/config/initializers/backtrace_silencers.rb
139
- - test/dummy/config/initializers/wrap_parameters.rb
140
- - test/dummy/config/routes.rb
141
- - test/dummy/config/application.rb
142
117
  - test/dummy/config/locales/en.yml
118
+ - test/dummy/config/environment.rb
143
119
  - test/dummy/config/environments/development.rb
144
120
  - test/dummy/config/environments/production.rb
145
121
  - test/dummy/config/environments/test.rb
122
+ - test/dummy/config/routes.rb
123
+ - test/dummy/config/initializers/inflections.rb
124
+ - test/dummy/config/initializers/wrap_parameters.rb
125
+ - test/dummy/config/initializers/mime_types.rb
126
+ - test/dummy/config/initializers/secret_token.rb
127
+ - test/dummy/config/initializers/session_store.rb
128
+ - test/dummy/config/initializers/backtrace_silencers.rb
129
+ - test/dummy/config/database.yml
146
130
  - test/dummy/config/boot.rb
147
- - test/dummy/config/environment.rb
131
+ - test/dummy/config/application.rb
132
+ - test/dummy/app/views/layouts/application.html.erb
133
+ - test/dummy/app/assets/javascripts/application.js
134
+ - test/dummy/app/assets/stylesheets/application.css
135
+ - test/dummy/app/controllers/application_controller.rb
136
+ - test/dummy/app/helpers/application_helper.rb
137
+ - test/dummy/config.ru
148
138
  - test/dummy/Rakefile
149
- - test/dummy/README.rdoc
150
- - test/dummy/db/test.sqlite3
151
- - test/dummy/public/422.html
152
- - test/dummy/public/favicon.ico
153
- - test/dummy/public/404.html
154
- - test/dummy/public/500.html
File without changes
@@ -1,25 +0,0 @@
1
- Connecting to database specified by database.yml
2
-  (0.2ms) begin transaction
3
-  (0.0ms) rollback transaction
4
- Connecting to database specified by database.yml
5
-  (0.2ms) begin transaction
6
-  (0.0ms) rollback transaction
7
- Connecting to database specified by database.yml
8
-  (0.2ms) begin transaction
9
-  (0.0ms) rollback transaction
10
- Connecting to database specified by database.yml
11
- Connecting to database specified by database.yml
12
-  (0.2ms) begin transaction
13
-  (0.0ms) rollback transaction
14
- Connecting to database specified by database.yml
15
-  (0.2ms) begin transaction
16
-  (0.0ms) rollback transaction
17
- Connecting to database specified by database.yml
18
-  (0.2ms) begin transaction
19
-  (0.0ms) rollback transaction
20
- Connecting to database specified by database.yml
21
-  (0.2ms) begin transaction
22
-  (0.0ms) rollback transaction
23
- Connecting to database specified by database.yml
24
-  (0.2ms) begin transaction
25
-  (0.0ms) rollback transaction