aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/CHANGELOG20
-rwxr-xr-xactiverecord/README2
-rwxr-xr-xactiverecord/Rakefile4
-rwxr-xr-xactiverecord/lib/active_record/base.rb8
-rwxr-xr-xactiverecord/lib/active_record/validations.rb6
-rwxr-xr-xactiverecord/test/validations_test.rb2
6 files changed, 21 insertions, 21 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index 0a798ef17b..e212942ee6 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,6 +1,4 @@
-*SVN*
-
-* Added Base.save! that attempts to save the record just like Base.save but will raise a InvalidRecord exception instead of returning false if the record is not valid [After much pestering from Dave Thomas]
+*1.10.0* (19th April, 2005)
* Added eager loading of associations as a way to solve the N+1 problem more gracefully without piggy-back queries. Example:
@@ -24,6 +22,15 @@
Person.find(:all, :conditions => [ "category IN (?)", categories], :limit => 50)
Person.find(:all, :offset => 10, :limit => 10)
+* Added acts_as_nested_set #1000 [wschenk]. Introduction:
+
+ This acts provides Nested Set functionality. Nested Set is similiar to Tree, but with
+ the added feature that you can select the children and all of it's descendants with
+ a single query. A good use case for this is a threaded post system, where you want
+ to display every reply to a comment without multiple selects.
+
+* Added Base.save! that attempts to save the record just like Base.save but will raise a RecordInvalid exception instead of returning false if the record is not valid [After much pestering from Dave Thomas]
+
* Fixed PostgreSQL usage of fixtures with regards to public schemas and table names with dots #962 [gnuman1@gmail.com]
* Fixed that fixtures were being deleted in the same order as inserts causing FK errors #890 [andrew.john.peters@gmail.com]
@@ -36,13 +43,6 @@
* Added the option to specify the acceptance string in validates_acceptance_of #1106 [caleb@aei-tech.com]
-* Added acts_as_nested_set #1000 [wschenk]. Introduction:
-
- This acts provides Nested Set functionality. Nested Set is similiar to Tree, but with
- the added feature that you can select the children and all of it's descendants with
- a single query. A good use case for this is a threaded post system, where you want
- to display every reply to a comment without multiple selects.
-
* Added insert_at(position) to acts_as_list #1083 [DeLynnB]
* Removed the default order by id on has_and_belongs_to_many queries as it could kill performance on large sets (you can still specify by hand with :order)
diff --git a/activerecord/README b/activerecord/README
index 8b2f255a09..300ce8a495 100755
--- a/activerecord/README
+++ b/activerecord/README
@@ -333,7 +333,7 @@ The prefered method of installing Active Record is through its GEM file. You'll
RubyGems[http://rubygems.rubyforge.org/wiki/wiki.pl] installed for that, though. If you have,
then use:
- % [sudo] gem install activerecord-1.7.0.gem
+ % [sudo] gem install activerecord-1.10.0.gem
You can also install Active Record the old-fashion way with the following command:
diff --git a/activerecord/Rakefile b/activerecord/Rakefile
index b566d79cf7..5fad4c33e0 100755
--- a/activerecord/Rakefile
+++ b/activerecord/Rakefile
@@ -8,7 +8,7 @@ require 'rake/contrib/rubyforgepublisher'
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME = 'activerecord'
-PKG_VERSION = '1.9.1' + PKG_BUILD
+PKG_VERSION = '1.10.0' + PKG_BUILD
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
RELEASE_NAME = "REL #{PKG_VERSION}"
@@ -76,7 +76,7 @@ spec = Gem::Specification.new do |s|
s.files = s.files + Dir.glob( "#{dir}/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
end
- s.add_dependency('activesupport', '= 1.0.3' + PKG_BUILD)
+ s.add_dependency('activesupport', '= 1.0.4' + PKG_BUILD)
s.files.delete "test/fixtures/fixture_database.sqlite"
s.files.delete "test/fixtures/fixture_database_2.sqlite"
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index a173a16eee..df91180332 100755
--- a/activerecord/lib/active_record/base.rb
+++ b/activerecord/lib/active_record/base.rb
@@ -96,7 +96,7 @@ module ActiveRecord #:nodoc:
# question mark is supposed to represent. In those cases, you can resort to named bind variables instead. That's done by replacing
# the question marks with symbols and supplying a hash with values for the matching symbol keys:
#
- # Company.find_first([
+ # Company.find(:first, [
# "id = :id AND name = :name AND division = :division AND created_at > :accounting_date",
# { :id => 3, :name => "37signals", :division => "First", :accounting_date => '2005-01-01' }
# ])
@@ -295,7 +295,7 @@ module ActiveRecord #:nodoc:
# If no record can be found for all of the listed ids, then RecordNotFound will be raised.
# * Find first: This will return the first record matched by the options used. These options can either be specific
# conditions or merely an order. If no record can matched, nil is returned.
- # # Find all: This will return all the records matched by the options used. If no records are found, an empty array is returned.
+ # * Find all: This will return all the records matched by the options used. If no records are found, an empty array is returned.
#
# All approaches accepts an option hash as their last parameter. The options are:
#
@@ -315,12 +315,12 @@ module ActiveRecord #:nodoc:
# Person.find(1, :conditions => "administrator = 1", :order => "created_on DESC")
#
# Examples for find first:
- # Person.find(:first) # returns the first object fetched by SELECT * FROM people
+ # Person.find(:first) # returns the first object fetched by SELECT * FROM people
# Person.find(:first, :conditions => [ "user_name = ?", user_name])
# Person.find(:first, :order => "created_on DESC", :offset => 5)
#
# Examples for find all:
- # Person.find(:all) # returns an array of objects for all the rows fetched by SELECT * FROM people
+ # Person.find(:all) # returns an array of objects for all the rows fetched by SELECT * FROM people
# Person.find(:all, :conditions => [ "category IN (?)", categories], :limit => 50)
# Person.find(:all, :offset => 10, :limit => 10)
# Person.find(:all, :include => [ :account, :friends ])
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb
index 6930a2a9d5..fb8879ef2a 100755
--- a/activerecord/lib/active_record/validations.rb
+++ b/activerecord/lib/active_record/validations.rb
@@ -1,5 +1,5 @@
module ActiveRecord
- class InvalidRecord < ActiveRecordError #:nodoc:
+ class RecordInvalid < ActiveRecordError #:nodoc:
end
# Active Record validation is reported to and from this object, which is used by Base#save to
@@ -555,10 +555,10 @@ module ActiveRecord
if perform_validation && valid? || !perform_validation then save_without_validation else false end
end
- # Attempts to save the record just like Base.save but will raise a InvalidRecord exception instead of returning false
+ # Attempts to save the record just like Base.save but will raise a RecordInvalid exception instead of returning false
# if the record is not valid.
def save!
- valid? ? save_without_validation : raise(InvalidRecord)
+ valid? ? save_without_validation : raise(RecordInvalid)
end
# Updates a single attribute and saves the record without going through the normal validation procedure.
diff --git a/activerecord/test/validations_test.rb b/activerecord/test/validations_test.rb
index a661193a98..585cad39bd 100755
--- a/activerecord/test/validations_test.rb
+++ b/activerecord/test/validations_test.rb
@@ -66,7 +66,7 @@ class ValidationsTest < Test::Unit::TestCase
def test_invalid_record_exception
r = Reply.new
- assert_raises(ActiveRecord::InvalidRecord) { r.save! }
+ assert_raises(ActiveRecord::RecordInvalid) { r.save! }
end
def test_single_error_per_attr_iteration