Skip to content

Commit ea5b794

Browse files
committed
Fix code comments
1 parent dfb1bbe commit ea5b794

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

lib/mongoid/config.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@ def running_with_passenger?
317317
# Defines a field type mapping, for later use in field :type option.
318318
#
319319
# @example
320-
# Mongoid.configure do
321-
# define_field_type :point, Point
320+
# Mongoid.configure do |config|
321+
# config.define_field_type :point, Point
322322
# end
323323
#
324324
# @param [ Symbol | String ] type_name The identifier of the
@@ -338,8 +338,8 @@ def define_field_type(type_name, klass)
338338
# provided in the field definition -- even if it is false or nil.
339339
#
340340
# @example
341-
# Mongoid.configure do
342-
# define_field_option :required do |model, field, value|
341+
# Mongoid.configure do |config|
342+
# config.define_field_option :required do |model, field, value|
343343
# model.validates_presence_of field.name if value
344344
# end
345345
# end

lib/mongoid/fields.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,8 @@ class << self
265265
# provided in the field definition -- even if it is false or nil.
266266
#
267267
# @example
268-
# Mongoid::Fields.configure do
269-
# option :required do |model, field, value|
270-
# model.validates_presence_of field.name if value
271-
# end
268+
# Mongoid::Fields.option :required do |model, field, value|
269+
# model.validates_presence_of field.name if value
272270
# end
273271
#
274272
# @param [ Symbol ] option_name the option name to match against

0 commit comments

Comments
 (0)