Skip to content

Commit ea5397e

Browse files
committed
[ci skip] Use symbols and double quoted strings more consistently in these docs
1 parent c70e264 commit ea5397e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

actionview/lib/action_view/helpers/form_options_helper.rb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module Helpers # :nodoc:
1616
#
1717
# * <tt>:include_blank</tt> - set to true or a prompt string if the first option element of the select element is a blank. Useful if there is not a default value required for the select element.
1818
#
19-
# select("post", "category", Post::CATEGORIES, { include_blank: true })
19+
# select(:post, :category, Post::CATEGORIES, { include_blank: true })
2020
#
2121
# could become:
2222
#
@@ -30,7 +30,7 @@ module Helpers # :nodoc:
3030
#
3131
# Example with <tt>@post.person_id => 2</tt>:
3232
#
33-
# select("post", "person_id", Person.all.collect { |p| [ p.name, p.id ] }, { include_blank: 'None' })
33+
# select(:post, :person_id, Person.all.collect { |p| [ p.name, p.id ] }, { include_blank: "None" })
3434
#
3535
# could become:
3636
#
@@ -43,7 +43,7 @@ module Helpers # :nodoc:
4343
#
4444
# * <tt>:prompt</tt> - set to true or a prompt string. When the select element doesn't have a value yet, this prepends an option with a generic prompt -- "Please select" -- or the given prompt string.
4545
#
46-
# select("post", "person_id", Person.all.collect { |p| [ p.name, p.id ] }, { prompt: 'Select Person' })
46+
# select(:post, :person_id, Person.all.collect { |p| [ p.name, p.id ] }, { prompt: "Select Person" })
4747
#
4848
# could become:
4949
#
@@ -57,7 +57,7 @@ module Helpers # :nodoc:
5757
# * <tt>:index</tt> - like the other form helpers, +select+ can accept an <tt>:index</tt> option to manually set the ID used in the resulting output. Unlike other helpers, +select+ expects this
5858
# option to be in the +html_options+ parameter.
5959
#
60-
# select("album[]", "genre", %w[rap rock country], {}, { index: nil })
60+
# select("album[]", :genre, %w[ rap rock country ], {}, { index: nil })
6161
#
6262
# becomes:
6363
#
@@ -69,7 +69,7 @@ module Helpers # :nodoc:
6969
#
7070
# * <tt>:disabled</tt> - can be a single value or an array of values that will be disabled options in the final output.
7171
#
72-
# select("post", "category", Post::CATEGORIES, { disabled: 'restricted' })
72+
# select(:post, :category, Post::CATEGORIES, { disabled: "restricted" })
7373
#
7474
# could become:
7575
#
@@ -282,17 +282,17 @@ def grouped_collection_select(object, method, collection, group_method, group_la
282282
# Finally, this method supports a <tt>:default</tt> option, which selects
283283
# a default ActiveSupport::TimeZone if the object's time zone is +nil+.
284284
#
285-
# time_zone_select("user", "time_zone", nil, include_blank: true)
285+
# time_zone_select(:user, :time_zone, nil, include_blank: true)
286286
#
287-
# time_zone_select("user", "time_zone", nil, default: "Pacific Time (US & Canada)")
287+
# time_zone_select(:user, :time_zone, nil, default: "Pacific Time (US & Canada)")
288288
#
289-
# time_zone_select("user", 'time_zone', ActiveSupport::TimeZone.us_zones, default: "Pacific Time (US & Canada)")
289+
# time_zone_select(:user, :time_zone, ActiveSupport::TimeZone.us_zones, default: "Pacific Time (US & Canada)")
290290
#
291-
# time_zone_select("user", 'time_zone', [ ActiveSupport::TimeZone['Alaska'], ActiveSupport::TimeZone['Hawaii'] ])
291+
# time_zone_select(:user, :time_zone, [ ActiveSupport::TimeZone["Alaska"], ActiveSupport::TimeZone["Hawaii"] ])
292292
#
293-
# time_zone_select("user", 'time_zone', /Australia/)
293+
# time_zone_select(:user, :time_zone, /Australia/)
294294
#
295-
# time_zone_select("user", "time_zone", ActiveSupport::TimeZone.all.sort, model: ActiveSupport::TimeZone)
295+
# time_zone_select(:user, :time_zone, ActiveSupport::TimeZone.all.sort, model: ActiveSupport::TimeZone)
296296
def time_zone_select(object, method, priority_zones = nil, options = {}, html_options = {})
297297
Tags::TimeZoneSelect.new(object, method, self, priority_zones, options, html_options).render
298298
end

0 commit comments

Comments
 (0)