@@ -318,15 +318,15 @@ def running_with_passenger?
318
318
#
319
319
# @example
320
320
# Mongoid.configure do |config|
321
- # config.define_field_type :point, Point
321
+ # config.field_type :point, Point
322
322
# end
323
323
#
324
324
# @param [ Symbol | String ] type_name The identifier of the
325
325
# defined type. This identifier may be accessible as either a
326
326
# Symbol or a String regardless of the type passed to this method.
327
327
# @param [ Module ] klass the class of the defined type, which must
328
328
# include mongoize, demongoize, and evolve methods.
329
- def define_field_type ( type_name , klass )
329
+ def field_type ( type_name , klass )
330
330
Mongoid ::Fields ::FieldTypes . define_type ( type_name , klass )
331
331
end
332
332
@@ -339,15 +339,15 @@ def define_field_type(type_name, klass)
339
339
#
340
340
# @example
341
341
# Mongoid.configure do |config|
342
- # config.define_field_option :required do |model, field, value|
342
+ # config.field_option :required do |model, field, value|
343
343
# model.validates_presence_of field.name if value
344
344
# end
345
345
# end
346
346
#
347
347
# @param [ Symbol ] option_name the option name to match against
348
348
# @param [ Proc ] block the handler to execute when the option is
349
349
# provided.
350
- def define_field_option ( option_name , &block )
350
+ def field_option ( option_name , &block )
351
351
Mongoid ::Fields . option ( option_name , &block )
352
352
end
353
353
0 commit comments