Use Active Model, not ActiveModel in plain English

Also prevents the word "Model" from linking to the documentation
of ActiveModel::Model because that's not intended.

[ci skip]
This commit is contained in:
claudiob 2015-01-02 14:19:21 -08:00
parent 6ae6e48b6e
commit 7cc145ec65
8 changed files with 10 additions and 10 deletions

View File

@ -22,7 +22,7 @@ module ActiveModel
module Conversion
extend ActiveSupport::Concern
# If your object is already designed to implement all of the Active Model
# If your object is already designed to implement all of the \Active \Model
# you can use the default <tt>:to_model</tt> implementation, which simply
# returns +self+.
#
@ -33,9 +33,9 @@ module ActiveModel
# person = Person.new
# person.to_model == person # => true
#
# If your model does not act like an Active Model object, then you should
# If your model does not act like an \Active \Model object, then you should
# define <tt>:to_model</tt> yourself returning a proxy object that wraps
# your object with Active Model compliant methods.
# your object with \Active \Model compliant methods.
def to_model
self
end

View File

@ -102,7 +102,7 @@ module ActiveModel
#
# If an attribute is modified in-place then make use of
# +[attribute_name]_will_change!+ to mark that the attribute is changing.
# Otherwise Active Model can't track changes to in-place attributes. Note
# Otherwise \Active \Model can't track changes to in-place attributes. Note
# that Active Record can detect in-place modifications automatically. You do
# not need to call +[attribute_name]_will_change!+ on Active Record models.
#

View File

@ -1,5 +1,5 @@
module ActiveModel
# Returns the version of the currently loaded Active Model as a <tt>Gem::Version</tt>
# Returns the version of the currently loaded \Active \Model as a <tt>Gem::Version</tt>
def self.gem_version
Gem::Version.new VERSION::STRING
end

View File

@ -211,7 +211,7 @@ module ActiveModel
# BookModule::BookCover.model_name.i18n_key # => :"book_module/book_cover"
#
# Providing the functionality that ActiveModel::Naming provides in your object
# is required to pass the Active Model Lint test. So either extending the
# is required to pass the \Active \Model Lint test. So either extending the
# provided method below, or rolling your own is required.
module Naming
def self.extended(base) #:nodoc:

View File

@ -6,7 +6,7 @@ require 'active_support/core_ext/time/acts_like'
module ActiveModel
module Serializers
# == Active Model XML Serializer
# == \Active \Model XML Serializer
module Xml
extend ActiveSupport::Concern
include ActiveModel::Serialization

View File

@ -1,6 +1,6 @@
module ActiveModel
module Validations
# == Active Model Absence Validator
# == \Active \Model Absence Validator
class AbsenceValidator < EachValidator #:nodoc:
def validate_each(record, attr_name, value)
record.errors.add(attr_name, :present, options) if value.present?

View File

@ -127,7 +127,7 @@ module ActiveModel
# in the options hash invoking the <tt>validate_each</tt> method passing in the
# record, attribute and value.
#
# All Active Model validations are built on top of this validator.
# All \Active \Model validations are built on top of this validator.
class EachValidator < Validator #:nodoc:
attr_reader :attributes

View File

@ -1,7 +1,7 @@
require_relative 'gem_version'
module ActiveModel
# Returns the version of the currently loaded ActiveModel as a <tt>Gem::Version</tt>
# Returns the version of the currently loaded \Active \Model as a <tt>Gem::Version</tt>
def self.version
gem_version
end