diff options
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/aggregations.rb | 8 | ||||
-rw-r--r-- | activerecord/lib/active_record/fixtures.rb | 7 | ||||
-rw-r--r-- | activerecord/lib/active_record/type/binary.rb | 4 | ||||
-rw-r--r-- | activerecord/lib/active_record/type/decimal.rb | 4 | ||||
-rw-r--r-- | activerecord/lib/active_record/type/float.rb | 4 | ||||
-rw-r--r-- | activerecord/lib/active_record/type/integer.rb | 4 | ||||
-rw-r--r-- | activerecord/lib/active_record/type/string.rb | 4 | ||||
-rw-r--r-- | activerecord/lib/active_record/type/value.rb | 1 |
8 files changed, 8 insertions, 28 deletions
diff --git a/activerecord/lib/active_record/aggregations.rb b/activerecord/lib/active_record/aggregations.rb index 4fead8d251..e576ec4d40 100644 --- a/activerecord/lib/active_record/aggregations.rb +++ b/activerecord/lib/active_record/aggregations.rb @@ -129,10 +129,10 @@ module ActiveRecord # is an instance of the value class. Specifying a custom converter allows the new value to be automatically # converted to an instance of value class if necessary. # - # For example, the NetworkResource model has +network_address+ and +cidr_range+ attributes that - # should be aggregated using the NetAddr::CIDR value class (http://netaddr.rubyforge.org). The constructor - # for the value class is called +create+ and it expects a CIDR address string as a parameter. New - # values can be assigned to the value object using either another NetAddr::CIDR object, a string + # For example, the NetworkResource model has +network_address+ and +cidr_range+ attributes that should be + # aggregated using the NetAddr::CIDR value class (http://www.ruby-doc.org/gems/docs/n/netaddr-1.5.0/NetAddr/CIDR.html). + # The constructor for the value class is called +create+ and it expects a CIDR address string as a parameter. + # New values can be assigned to the value object using either another NetAddr::CIDR object, a string # or an array. The <tt>:constructor</tt> and <tt>:converter</tt> options can be used to meet # these requirements: # diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index f3d3cdc9e3..6ba667b996 100644 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -33,7 +33,7 @@ module ActiveRecord # is followed by an indented list of key/value pairs in the "key: value" format. Records are # separated by a blank line for your viewing pleasure. # - # Note that fixtures are unordered. If you want ordered fixtures, use the omap YAML type. + # Note: Fixtures are unordered. If you want ordered fixtures, use the omap YAML type. # See http://yaml.org/type/omap.html # for the specification. You will need ordered fixtures when you have foreign key constraints # on keys in the same table. This is commonly needed for tree structures. Example: @@ -374,8 +374,9 @@ module ActiveRecord # # == Support for YAML defaults # - # You probably already know how to use YAML to set and reuse defaults in - # your <tt>database.yml</tt> file. You can use the same technique in your fixtures: + # You can set and reuse defaults in your fixtures YAML file. + # This is the same technique used in the <tt>database.yml</tt> file + # to specify defaults: # # DEFAULTS: &DEFAULTS # created_on: <%= 3.weeks.ago.to_s(:db) %> diff --git a/activerecord/lib/active_record/type/binary.rb b/activerecord/lib/active_record/type/binary.rb index 9d10c91fc1..bc93f6e1bf 100644 --- a/activerecord/lib/active_record/type/binary.rb +++ b/activerecord/lib/active_record/type/binary.rb @@ -9,10 +9,6 @@ module ActiveRecord true end - def klass - ::String - end - def type_cast_for_database(value) Data.new(super) end diff --git a/activerecord/lib/active_record/type/decimal.rb b/activerecord/lib/active_record/type/decimal.rb index 6eed005345..a9db51c6ba 100644 --- a/activerecord/lib/active_record/type/decimal.rb +++ b/activerecord/lib/active_record/type/decimal.rb @@ -7,10 +7,6 @@ module ActiveRecord :decimal end - def klass - ::BigDecimal - end - def type_cast_for_schema(value) value.to_s end diff --git a/activerecord/lib/active_record/type/float.rb b/activerecord/lib/active_record/type/float.rb index dc50dae328..42eb44b9a9 100644 --- a/activerecord/lib/active_record/type/float.rb +++ b/activerecord/lib/active_record/type/float.rb @@ -7,10 +7,6 @@ module ActiveRecord :float end - def klass - ::Float - end - alias type_cast_for_database type_cast private diff --git a/activerecord/lib/active_record/type/integer.rb b/activerecord/lib/active_record/type/integer.rb index 1e2147dec9..08477d1303 100644 --- a/activerecord/lib/active_record/type/integer.rb +++ b/activerecord/lib/active_record/type/integer.rb @@ -7,10 +7,6 @@ module ActiveRecord :integer end - def klass - ::Fixnum - end - alias type_cast_for_database type_cast private diff --git a/activerecord/lib/active_record/type/string.rb b/activerecord/lib/active_record/type/string.rb index b3f6ca7691..3b1554bd5a 100644 --- a/activerecord/lib/active_record/type/string.rb +++ b/activerecord/lib/active_record/type/string.rb @@ -9,10 +9,6 @@ module ActiveRecord true end - def klass - ::String - end - private def cast_value(value) diff --git a/activerecord/lib/active_record/type/value.rb b/activerecord/lib/active_record/type/value.rb index c072c1e2b6..4bc3086db3 100644 --- a/activerecord/lib/active_record/type/value.rb +++ b/activerecord/lib/active_record/type/value.rb @@ -48,7 +48,6 @@ module ActiveRecord end def klass # :nodoc: - ::Object end def type_cast_for_write(value) # :nodoc: |