Permalink
Browse files

Documented some undocumented activerecord methods.

  • Loading branch information...
radar committed Dec 16, 2008
1 parent a3161ff commit 016fffff6d6e434ee7fa69531b08b07d99f48583
@@ -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
@@ -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

0 comments on commit 016ffff

Please sign in to comment.