Skip to content

Commit a12f4b7

Browse files
Merge pull request #1849 from tagliala/chore/fix-typos
Fix typos [ci skip]
2 parents 74b9c68 + 57f20d6 commit a12f4b7

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ See http://blog.plataformatec.com.br/2019/09/incorrect-access-control-in-simple-
112112
### Bug fix
113113
* Fix horizontal form label position, from right to text-right. [@cavpollo](https://github.com/cavpollo)
114114
* Add base error display alongside existing errors. [@bluefalcon26](https://github.com/bluefalcon26)
115-
* Silent deprication warning for placeholder_text. [@moofkit](https://github.com/moofkit)
115+
* Silent deprecation warning for placeholder_text. [@moofkit](https://github.com/moofkit)
116116
* Use custom i18n scope for label required html. [@tvdeyen](https://github.com/tvdeyen)
117117

118118
## 3.5.1
@@ -234,7 +234,7 @@ See http://blog.plataformatec.com.br/2019/09/incorrect-access-control-in-simple-
234234

235235
### bug fix
236236
* Fix `full_error` when the attribute is an association. [@mvdamme](https://github.com/jorge-d)
237-
* Fix suppport to `:namespace` and `:index` options for nested check boxes and radio buttons when the attribute is an association.
237+
* Fix support to `:namespace` and `:index` options for nested check boxes and radio buttons when the attribute is an association.
238238
* Collection input that uses automatic collection translation properly sets checked values.
239239
Closes [#971](https://github.com/heartcombo/simple_form/issues/971) [@nashby](https://github.com/nashby)
240240
* Collection input generates `required` attribute if it has `prompt` option. [@nashby](https://github.com/nashby)

lib/simple_form.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ def self.deprecator
7373
mattr_accessor :error_notification_class
7474
@@error_notification_class = :error_notification
7575

76-
# Series of attemps to detect a default label method for collection.
76+
# Series of attempts to detect a default label method for collection.
7777
mattr_accessor :collection_label_methods
7878
@@collection_label_methods = %i[to_label name title to_s]
7979

80-
# Series of attemps to detect a default value method for collection.
80+
# Series of attempts to detect a default value method for collection.
8181
mattr_accessor :collection_value_methods
8282
@@collection_value_methods = %i[id to_s]
8383

@@ -178,7 +178,7 @@ def self.deprecator
178178
mattr_accessor :cache_discovery
179179
@@cache_discovery = defined?(Rails.env) && !Rails.env.development?
180180

181-
# Adds a class to each generated button, mostly for compatiblity.
181+
# Adds a class to each generated button, mostly for compatibility.
182182
mattr_accessor :button_class
183183
@@button_class = 'button'
184184

test/action_view_extensions/builder_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def with_collection_check_boxes(object, attribute, collection, value_method, tex
261261
end
262262
end
263263
# COLLECTION CHECK BOX
264-
test "collection check box accepts a collection and generate a serie of checkboxes for value method" do
264+
test "collection check box accepts a collection and generate a series of checkboxes for value method" do
265265
collection = [Tag.new(1, 'Tag 1'), Tag.new(2, 'Tag 2')]
266266
with_collection_check_boxes @user, :tag_ids, collection, :id, :name
267267

@@ -276,7 +276,7 @@ def with_collection_check_boxes(object, attribute, collection, value_method, tex
276276
assert_select "form input[type=hidden][name='user[tag_ids][]'][value='']", count: 1
277277
end
278278

279-
test "collection check box accepts a collection and generate a serie of checkboxes with labels for label method" do
279+
test "collection check box accepts a collection and generate a series of checkboxes with labels for label method" do
280280
collection = [Tag.new(1, 'Tag 1'), Tag.new(2, 'Tag 2')]
281281
with_collection_check_boxes @user, :tag_ids, collection, :id, :name
282282

@@ -569,7 +569,7 @@ def with_collection_check_boxes(object, attribute, collection, value_method, tex
569569
end
570570
end
571571

572-
test "fields for with a hash like model yeilds an instance of FormBuilder" do
572+
test "fields for with a hash like model yields an instance of FormBuilder" do
573573
with_concat_form_for(:user) do |f|
574574
f.simple_fields_for(:author, HashBackedAuthor.new) do |author|
575575
assert author.instance_of?(SimpleForm::FormBuilder)

test/form_builder/label_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def with_label_for(object, *args, &block)
104104
end
105105
end
106106

107-
test 'configuration allow set rewrited label tag for wrappers' do
107+
test 'configuration allow set rewritten label tag for wrappers' do
108108
swap_wrapper :default, custom_wrapper_with_custom_label_component do
109109
with_concat_form_for(@user) do |f|
110110
concat f.input :age

test/inputs/collection_select_input_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,15 +220,15 @@ class CollectionSelectInputTest < ActionView::TestCase
220220
assert_select 'select option[value="2"]', 'Carlos'
221221
end
222222

223-
test 'input disables the anothers components when the option is a object' do
223+
test 'input disables all options when the entire select is disabled' do
224224
with_input_for @user, :description, :select, collection: %w[Jose Carlos], disabled: true
225225
assert_no_select 'select option[value=Jose][disabled=disabled]', 'Jose'
226226
assert_no_select 'select option[value=Carlos][disabled=disabled]', 'Carlos'
227227
assert_select 'select[disabled=disabled]'
228228
assert_select 'div.disabled'
229229
end
230230

231-
test 'input does not disable the anothers components when the option is a object' do
231+
test 'input disables only specific options when individual options are disabled' do
232232
with_input_for @user, :description, :select, collection: %w[Jose Carlos], disabled: 'Jose'
233233
assert_select 'select option[value=Jose][disabled=disabled]', 'Jose'
234234
assert_no_select 'select option[value=Carlos][disabled=disabled]', 'Carlos'

test/inputs/discovery_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def discovery(value = false)
6666
end
6767
end
6868

69-
test 'builder discovers new maped inputs from configured namespaces if not cached' do
69+
test 'builder discovers new mapped inputs from configured namespaces if not cached' do
7070
discovery do
7171
swap SimpleForm, custom_inputs_namespaces: ['CustomInputs'] do
7272
with_form_for @user, :password
@@ -75,7 +75,7 @@ def discovery(value = false)
7575
end
7676
end
7777

78-
test 'builder discovers new maped inputs from configured namespaces before the ones from top level namespace' do
78+
test 'builder discovers new mapped inputs from configured namespaces before the ones from top level namespace' do
7979
discovery do
8080
swap SimpleForm, custom_inputs_namespaces: ['CustomInputs'] do
8181
with_form_for @user, :age

0 commit comments

Comments
 (0)