Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Documented some undocumented activerecord methods.

  • Loading branch information...
commit 016fffff6d6e434ee7fa69531b08b07d99f48583 1 parent a3161ff
@radar radar authored
View
3  activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb
@@ -122,7 +122,8 @@ def connection_pool
def retrieve_connection
connection_handler.retrieve_connection(self)
end
-
+
+ # Returns true if +ActiveRecord+ is connected.
def connected?
connection_handler.connected?(self)
end
View
6 activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
@@ -31,11 +31,13 @@ def initialize(name, default, sql_type = nil, null = true)
@primary = nil
end
-
+
+ # Returns +true+ if the column is either of type string or text.
def text?
type == :string || type == :text
end
-
+
+ # Returns +true+ if the column is either of type integer, float or decimal.
def number?
type == :integer || type == :float || type == :decimal
end
Please sign in to comment.
Something went wrong with that request. Please try again.