Permalink
Browse files

fixes a few mistakes in api docs [ci skip]

  • Loading branch information...
1 parent 741cb5b commit 6285675db1cf983ba6c15442aedb457c8041f5ee @vijaydev vijaydev committed Jun 22, 2012
@@ -979,7 +979,7 @@ def search_field(object_name, method, options = {})
def telephone_field(object_name, method, options = {})
Tags::TelField.new(object_name, method, self, options).render
end
- # alias of telephone_field
+ # aliases telephone_field
alias phone_field telephone_field
# Returns a text_field of type "date".
@@ -187,7 +187,7 @@ def attribute_method_affix(*affixes)
#
# private
#
- # def attribute_short?(attr)
+ # def attribute_short?(attr)
# send(attr).length < 5
# end
# end
@@ -162,7 +162,7 @@ def validate(*args, &block)
# validates_with StrictValidator, strict: true
# end
#
- # User.validators
+ # Person.validators
# # => [
# # #<MyValidator:0x007fbff403e808 @options={}>,
# # #<OtherValidator:0x007fbff403d930 @options={:on=>:create}>,
@@ -213,12 +213,10 @@ def having!(opts, *rest)
self
end
- # Specifies a limit of records.
+ # Specifies a limit for the number of records to retrieve.
#
# User.limit(10) # generated SQL has 'LIMIT 10'
#
- # Replaces any existing previous limit.
- #
# User.limit(10).limit(20) # generated SQL has 'LIMIT 20'
def limit(value)
spawn.limit!(value)
@@ -233,7 +231,7 @@ def limit!(value)
#
# User.offset(10) # generated SQL has "OFFSET 10"
#
- # Should be used with order.
+ # Should be used with order.
#
# User.offset(10).order("name ASC")
def offset(value)
@@ -20,7 +20,7 @@ def warn(message = nil, callstack = caller)
# ActiveSupport::Deprecation.warn("something broke!")
# # => "DEPRECATION WARNING: something broke! (called from your_code.rb:1)"
#
- # Activesupport::Deprecation.silence do
+ # ActiveSupport::Deprecation.silence do
# ActiveSupport::Deprecation.warn("something broke!")
# end
# # => nil
@@ -90,7 +90,7 @@ def assert_blank(object, message=nil)
assert object.blank?, message
end
- # Test if an expression is not blank. Passes <tt>if object.present?</tt> is +true+.
+ # Test if an expression is not blank. Passes if <tt>object.present?</tt> is +true+.
#
# assert_present({ data: 'x' }) # => true
# assert_present({}) # => {} is blank

0 comments on commit 6285675

Please sign in to comment.