aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model
diff options
context:
space:
mode:
authorMikel Lindsaar <raasdnil@gmail.com>2010-01-17 15:35:18 +1100
committerMikel Lindsaar <raasdnil@gmail.com>2010-01-17 15:35:18 +1100
commitcf55e4e3821f8a57663351c87f596e8161bcb71d (patch)
tree9b7791c0de9347b1fade9dac7bbfd6ea5ed856f5 /activemodel/lib/active_model
parent4d4bdb0766713d78a2e5126ab4832c45324aa471 (diff)
downloadrails-cf55e4e3821f8a57663351c87f596e8161bcb71d.tar.gz
rails-cf55e4e3821f8a57663351c87f596e8161bcb71d.tar.bz2
rails-cf55e4e3821f8a57663351c87f596e8161bcb71d.zip
Added documentation for ActiveModel::Lint
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r--activemodel/lib/active_model/lint.rb14
1 files changed, 5 insertions, 9 deletions
diff --git a/activemodel/lib/active_model/lint.rb b/activemodel/lib/active_model/lint.rb
index 0be82aa180..eabd542485 100644
--- a/activemodel/lib/active_model/lint.rb
+++ b/activemodel/lib/active_model/lint.rb
@@ -13,8 +13,7 @@
module ActiveModel
module Lint
module Tests
- # valid?
- # ------
+ # == Responds to <tt>valid?</tt>
#
# Returns a boolean that specifies whether the object is in a valid or invalid
# state.
@@ -23,8 +22,7 @@ module ActiveModel
assert_boolean model.valid?, "valid?"
end
- # new_record?
- # -----------
+ # == Responds to <tt>new_record?</tt>
#
# Returns a boolean that specifies whether the object has been persisted yet.
# This is used when calculating the URL for an object. If the object is
@@ -41,8 +39,7 @@ module ActiveModel
assert_boolean model.destroyed?, "destroyed?"
end
- # naming
- # ------
+ # == Naming
#
# Model.model_name must returns a string with some convenience methods as
# :human and :partial_path. Check ActiveModel::Naming for more information.
@@ -55,9 +52,8 @@ module ActiveModel
assert_kind_of String, model_name.partial_path
end
- # errors
- # ------
- #
+ # == Errors Testing
+ #
# Returns an object that has :[] and :full_messages defined on it. See below
# for more details.