Skip to content

Commit 811497e

Browse files
Remove RDoc syntax in code example comments [ci-skip]
1 parent 5ae9137 commit 811497e

File tree

9 files changed

+17
-17
lines changed

9 files changed

+17
-17
lines changed

actionpack/lib/action_controller/metal/params_wrapper.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,14 @@ def _set_wrapper_options(options)
198198
# # enables the parameter wrapper for XML format
199199
#
200200
# wrap_parameters :person
201-
# # wraps parameters into +params[:person]+ hash
201+
# # wraps parameters into params[:person] hash
202202
#
203203
# wrap_parameters Person
204204
# # wraps parameters by determining the wrapper key from Person class
205-
# # (+person+, in this case) and the list of attribute names
205+
# # (:person, in this case) and the list of attribute names
206206
#
207207
# wrap_parameters include: [:username, :title]
208-
# # wraps only +:username+ and +:title+ attributes from parameters.
208+
# # wraps only :username and :title attributes from parameters.
209209
#
210210
# wrap_parameters false
211211
# # disables parameters wrapping for this controller altogether.

actionpack/lib/action_dispatch/routing/mapper.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ module Scoping
977977
#
978978
# Takes same options as `Base#match` and `Resources#resources`.
979979
#
980-
# # route /posts (without the prefix /admin) to +Admin::PostsController+
980+
# # route /posts (without the prefix /admin) to Admin::PostsController
981981
# scope module: "admin" do
982982
# resources :posts
983983
# end
@@ -987,7 +987,7 @@ module Scoping
987987
# resources :posts
988988
# end
989989
#
990-
# # prefix the routing helper name: +sekret_posts_path+ instead of +posts_path+
990+
# # prefix the routing helper name: sekret_posts_path instead of posts_path
991991
# scope as: "sekret" do
992992
# resources :posts
993993
# end
@@ -1090,12 +1090,12 @@ def controller(controller)
10901090
# resources :posts
10911091
# end
10921092
#
1093-
# # maps to +Sekret::PostsController+ rather than +Admin::PostsController+
1093+
# # maps to Sekret::PostsController rather than Admin::PostsController
10941094
# namespace :admin, module: "sekret" do
10951095
# resources :posts
10961096
# end
10971097
#
1098-
# # generates +sekret_posts_path+ rather than +admin_posts_path+
1098+
# # generates sekret_posts_path rather than admin_posts_path
10991099
# namespace :admin, as: "sekret" do
11001100
# resources :posts
11011101
# end
@@ -1660,7 +1660,7 @@ def resource(*resources, concerns: nil, **options, &block)
16601660
#
16611661
# ### Examples
16621662
#
1663-
# # routes call +Admin::PostsController+
1663+
# # routes call Admin::PostsController
16641664
# resources :posts, module: "admin"
16651665
#
16661666
# # resource actions are at /admin/posts.

actionview/lib/action_view/helpers/cache_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def caching?
206206
# "#{project.name} - #{Time.now}"
207207
# end
208208
#
209-
# # Which will then raise if used within a +cache+ block:
209+
# # Which will then raise if used within a `cache` block:
210210
# <% cache project do %>
211211
# <%= project_name_with_time(project) %>
212212
# <% end %>

actionview/lib/action_view/helpers/form_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@ def fields_for(record_name, record_object = nil, options = {}, &block)
10481048
# <% end %>
10491049
# # => <input type="text" name="comment[body]" value="full bodied">
10501050
#
1051-
# # Using +fields+ with +form_with+:
1051+
# # Using `fields` with `form_with`:
10521052
# <%= form_with model: @article do |form| %>
10531053
# <%= form.text_field :title %>
10541054
#

actionview/lib/action_view/renderer/partial_renderer.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ module ActionView
9494
# # <%= render partial: "accounts/account", locals: { account: @account} %>
9595
# <%= render partial: @account %>
9696
#
97-
# # @posts is an array of Post instances, so every post record returns 'posts/post' on +to_partial_path+,
97+
# # @posts is an array of Post instances, so every post record returns 'posts/post' on #to_partial_path,
9898
# # that's why we can replace:
9999
# # <%= render partial: "posts/post", collection: @posts %>
100100
# <%= render partial: @posts %>
@@ -114,7 +114,7 @@ module ActionView
114114
# # <%= render partial: "accounts/account", locals: { account: @account} %>
115115
# <%= render @account %>
116116
#
117-
# # @posts is an array of Post instances, so every post record returns 'posts/post' on +to_partial_path+,
117+
# # @posts is an array of Post instances, so every post record returns 'posts/post' on #to_partial_path,
118118
# # that's why we can replace:
119119
# # <%= render partial: "posts/post", collection: @posts %>
120120
# <%= render @posts %>

activerecord/lib/active_record/attributes.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ module ClassMethods
179179
# @currency_converter = currency_converter
180180
# end
181181
#
182-
# # value will be the result of +deserialize+ or
183-
# # +cast+. Assumed to be an instance of +Money+ in
182+
# # value will be the result of #deserialize or
183+
# # #cast. Assumed to be an instance of Money in
184184
# # this case.
185185
# def serialize(value)
186186
# value_in_bitcoins = @currency_converter.convert_to_bitcoins(value)

activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ def [](name)
437437
#
438438
# == Examples
439439
#
440-
# # Assuming +td+ is an instance of TableDefinition
440+
# # Assuming `td` is an instance of TableDefinition
441441
# td.column(:granted, :boolean, index: true)
442442
#
443443
# == Short-hand examples

activerecord/lib/active_record/counter_cache.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module ClassMethods
3131
# # For posts with ids #1 and #2, reset the comments_count
3232
# Post.reset_counters([1, 2], :comments)
3333
#
34-
# # Like above, but also touch the +updated_at+ and/or +updated_on+
34+
# # Like above, but also touch the updated_at and/or updated_on
3535
# # attributes.
3636
# Post.reset_counters(1, :comments, touch: true)
3737
def reset_counters(id, *counters, touch: nil)

activerecord/lib/active_record/delegated_type.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ module DelegatedType
181181
# delegated_type :entryable, types: %w[ Message Comment ], dependent: :destroy
182182
# end
183183
#
184-
# Entry#entryable_class # => +Message+ or +Comment+
184+
# Entry#entryable_class # => Message or Comment
185185
# Entry#entryable_name # => "message" or "comment"
186186
# Entry.messages # => Entry.where(entryable_type: "Message")
187187
# Entry#message? # => true when entryable_type == "Message"

0 commit comments

Comments
 (0)