Skip to content

Commit 2000d32

Browse files
committed
Consistently refer to SimpleForm in docs and tests
In most official-looking places, the gem is refered to as "SimpleForm", rather than "simple form", "Simple Form" or "simple_form". When we're talking about the gem, use "SimpleForm". In code, keep "simple_form". Eliminate all instances of "simple form" except when capitalized in deprecation messages.
1 parent 48ea550 commit 2000d32

File tree

10 files changed

+26
-26
lines changed

10 files changed

+26
-26
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![Build Status](https://secure.travis-ci.org/plataformatec/simple_form.png)](http://travis-ci.org/plataformatec/simple_form)
33

44
**SimpleForm** aims to be as flexible as possible while helping you with powerful components to create
5-
your forms. The basic goal of simple form is to not touch your way of defining the layout, letting
5+
your forms. The basic goal of SimpleForm is to not touch your way of defining the layout, letting
66
you find the better design for your eyes. Most of the DSL was inherited from Formtastic,
77
which we are thankful for and should make you feel right at home.
88

@@ -485,7 +485,7 @@ on `simple_form_for` helper. They are listed below.
485485

486486
### Simple Fields For
487487

488-
Wrapper to use simple form inside a default rails form
488+
Wrapper to use SimpleForm inside a default rails form
489489

490490
```ruby
491491
form_for @user do |f|

lib/generators/simple_form/install_generator.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class InstallGenerator < Rails::Generators::Base
88

99
def info_bootstrap
1010
return if options.bootstrap?
11-
puts "Simple Form 2 supports Twitter bootstrap. In case you want to " \
11+
puts "SimpleForm 2 supports Twitter bootstrap. In case you want to " \
1212
"generate bootstrap configuration, please re-run this " \
1313
"generator passing --bootstrap as option."
1414
end

lib/generators/simple_form/templates/config/initializers/simple_form.rb.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,6 @@ SimpleForm.setup do |config|
171171
# Automatically discover new inputs in Rails' autoload path.
172172
# config.inputs_discovery = true
173173

174-
# Cache simple form inputs discovery
174+
# Cache SimpleForm inputs discovery
175175
# config.cache_discovery = !Rails.env.development?
176176
end

lib/simple_form.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ module SimpleForm
116116
mattr_accessor :inputs_discovery
117117
@@inputs_discovery = true
118118

119-
# Cache simple form inputs discovery
119+
# Cache SimpleForm inputs discovery
120120
mattr_accessor :cache_discovery
121121
@@cache_discovery = defined?(Rails) && !Rails.env.development?
122122

@@ -207,7 +207,7 @@ def self.setup
207207
yield self
208208

209209
unless @@deprecated.empty?
210-
raise "[SIMPLE FORM] Your simple form initializer file is using the following methods: #{@@deprecated.to_sentence}. " <<
210+
raise "[SIMPLE FORM] Your SimpleForm initializer file is using the following methods: #{@@deprecated.to_sentence}. " <<
211211
"Those methods are part of the outdated configuration API. Updating to the new API is easy and fast. " <<
212212
"Check for more info here: https://github.com/plataformatec/simple_form/wiki/Upgrading-to-Simple-Form-2.0"
213213
end

lib/simple_form/action_view_extensions/builder.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def collection_check_boxes(attribute, collection, value_method, text_method, opt
183183
wrap_rendered_collection(rendered_collection + hidden, options)
184184
end
185185

186-
# Wrapper for using simple form inside a default rails form.
186+
# Wrapper for using SimpleForm inside a default rails form.
187187
# Example:
188188
#
189189
# form_for @user do |f|

lib/simple_form/action_view_extensions/form_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module SimpleForm
22
module ActionViewExtensions
3-
# This module creates simple form wrappers around default form_for and fields_for.
3+
# This module creates SimpleForm wrappers around default form_for and fields_for.
44
#
55
# Example:
66
#

test/action_view_extensions/form_helper_test.rb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22

33
class FormHelperTest < ActionView::TestCase
44

5-
test 'simple form for yields an instance of FormBuilder' do
5+
test 'SimpleForm for yields an instance of FormBuilder' do
66
simple_form_for :user do |f|
77
assert f.instance_of?(SimpleForm::FormBuilder)
88
end
99
end
1010

11-
test 'simple form should add default class to form' do
11+
test 'SimpleForm should add default class to form' do
1212
concat(simple_form_for(:user) do |f| end)
1313
assert_select 'form.simple_form'
1414
end
1515

16-
test 'simple form should use default browser validations by default' do
16+
test 'SimpleForm should use default browser validations by default' do
1717
concat(simple_form_for(:user) do |f| end)
1818
assert_no_select 'form[novalidate]'
1919
end
2020

21-
test 'simple form should not use default browser validations if specified in the configuration options' do
21+
test 'SimpleForm should not use default browser validations if specified in the configuration options' do
2222
swap SimpleForm, :browser_validations => false do
2323
concat(simple_form_for(:user) do |f| end)
2424
assert_select 'form[novalidate="novalidate"]'
@@ -37,49 +37,49 @@ class FormHelperTest < ActionView::TestCase
3737
end
3838
end
3939

40-
test 'simple form should add object name as css class to form when object is not present' do
40+
test 'SimpleForm should add object name as css class to form when object is not present' do
4141
concat(simple_form_for(:user) do |f| end)
4242
assert_select 'form.simple_form.user'
4343
end
4444

45-
test 'simple form should add :as option as css class to form when object is not present' do
45+
test 'SimpleForm should add :as option as css class to form when object is not present' do
4646
concat(simple_form_for(:user, :as => 'superuser') do |f| end)
4747
assert_select 'form.simple_form.superuser'
4848
end
4949

50-
test 'simple form should add object class name with new prefix as css class to form if record is not persisted' do
50+
test 'SimpleForm should add object class name with new prefix as css class to form if record is not persisted' do
5151
@user.new_record!
5252
concat(simple_form_for(@user) do |f| end)
5353
assert_select 'form.simple_form.new_user'
5454
end
5555

56-
test 'simple form should add :as option with new prefix as css class to form if record is not persisted' do
56+
test 'SimpleForm should add :as option with new prefix as css class to form if record is not persisted' do
5757
@user.new_record!
5858
concat(simple_form_for(@user, :as => 'superuser') do |f| end)
5959
assert_select 'form.simple_form.new_superuser'
6060
end
6161

62-
test 'simple form should add edit class prefix as css class to form if record is persisted' do
62+
test 'SimpleForm should add edit class prefix as css class to form if record is persisted' do
6363
concat(simple_form_for(@user) do |f| end)
6464
assert_select 'form.simple_form.edit_user'
6565
end
6666

67-
test 'simple form should add :as options with edit prefix as css class to form if record is persisted' do
67+
test 'SimpleForm should add :as options with edit prefix as css class to form if record is persisted' do
6868
concat(simple_form_for(@user, :as => 'superuser') do |f| end)
6969
assert_select 'form.simple_form.edit_superuser'
7070
end
7171

72-
test 'simple form should not add object class to form if css_class is specified' do
72+
test 'SimpleForm should not add object class to form if css_class is specified' do
7373
concat(simple_form_for(:user, :html => {:class => nil}) do |f| end)
7474
assert_no_select 'form.user'
7575
end
7676

77-
test 'simple form should add custom class to form if css_class is specified' do
77+
test 'SimpleForm should add custom class to form if css_class is specified' do
7878
concat(simple_form_for(:user, :html => {:class => 'my_class'}) do |f| end)
7979
assert_select 'form.my_class'
8080
end
8181

82-
test 'pass options to simple form' do
82+
test 'pass options to SimpleForm' do
8383
concat(simple_form_for(:user, :url => '/account', :html => { :id => 'my_form' }) do |f| end)
8484
assert_select 'form#my_form'
8585
assert_select 'form[action=/account]'

test/inputs/priority_input_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class PriorityInputTest < ActionView::TestCase
99
assert_no_select 'select option[value=][disabled=disabled]'
1010
end
1111

12-
test 'input should generate a country select with simple form default' do
12+
test 'input should generate a country select with SimpleForm default' do
1313
swap SimpleForm, :country_priority => [ 'Brazil' ] do
1414
with_input_for @user, :country, :country
1515
assert_select 'select option[value=][disabled=disabled]'

test/inputs/string_input_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class StringInputTest < ActionView::TestCase
55
test 'input should map text field to string attribute' do
66
with_input_for @user, :name, :string
7-
assert_select "input#user_name[type=text][name='user[name]'][value=New in Simple Form!]"
7+
assert_select "input#user_name[type=text][name='user[name]'][value=New in SimpleForm!]"
88
end
99

1010
test 'input should generate a password field for password attributes' do

test/test_helper.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ def set_response
5151
def setup_new_user(options={})
5252
@user = User.new({
5353
:id => 1,
54-
:name => 'New in Simple Form!',
54+
:name => 'New in SimpleForm!',
5555
:description => 'Hello!',
5656
:created_at => Time.now
5757
}.merge(options))
5858

5959
@validating_user = ValidatingUser.new({
6060
:id => 1,
61-
:name => 'New in Simple Form!',
61+
:name => 'New in SimpleForm!',
6262
:description => 'Hello!',
6363
:home_picture => 'Home picture',
6464
:created_at => Time.now,
@@ -70,7 +70,7 @@ def setup_new_user(options={})
7070

7171
@other_validating_user = OtherValidatingUser.new({
7272
:id => 1,
73-
:name => 'New in Simple Form!',
73+
:name => 'New in SimpleForm!',
7474
:description => 'Hello!',
7575
:created_at => Time.now,
7676
:age => 19,

0 commit comments

Comments
 (0)