David Heinemeier Hansson
ec4dd572e7
Added Sybase database adapter that relies on the Sybase Open Client bindings (see http://raa.ruby-lang.org/project/sybase-ctlib ) ( closes #3765 ) [John Sheets]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3735 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-02 01:25:50 +00:00
David Heinemeier Hansson
6a3f4c932a
Added Sybase database adapter that relies on the Sybase Open Client bindings (see http://raa.ruby-lang.org/project/sybase-ctlib ) ( closes #3765 ) [John Sheets]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3734 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-02 01:15:41 +00:00
Jeremy Kemper
a434cec2e6
(duh :)
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3732 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-01 22:14:00 +00:00
Jeremy Kemper
d28c0f7405
Typo in stale thread removal.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3731 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-01 22:09:46 +00:00
Jeremy Kemper
7568f18a2a
Clear stale, cached connections left behind by defunct threads. Eliminate duplicate connection cache.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3729 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-01 22:05:41 +00:00
Jeremy Kemper
d8641ca34f
CHANGED DEFAULT: set ActiveRecord::Base.allow_concurrency to false. Most AR usage is in single-threaded applications.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3728 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-01 22:04:30 +00:00
David Heinemeier Hansson
a8d085adf0
Make calculations typecasty! ( closes #4016 ) [Rick Olson]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3722 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-01 16:25:14 +00:00
David Heinemeier Hansson
631181ca18
Renamed the "oci" adapter to "oracle", but kept the old name as an alias ( closes #4017 ) [schoenm@earthlink.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-01 16:01:53 +00:00
David Heinemeier Hansson
491554f6dd
Make #save return true on success, even if locking is enabled ( closes #4015 ) [schoenm@earthlink.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3716 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-01 05:43:50 +00:00
David Heinemeier Hansson
4c7555aef7
Fixed that Base.save should always return false if the save didn't succeed, including if it has halted by before_save's ( closes #1861 , #2477 ) [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3707 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-28 20:37:21 +00:00
Michael Koziarski
17ff70ac84
Make rake load_fixtures work with the new, flexible, fixtures api. [Rick Olson]. Closes #3995
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3706 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-28 20:18:02 +00:00
Michael Koziarski
a117d68f0f
Add more documentation for Reflection. [robby@planetargon.com]. Closes #4001
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3705 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-28 20:13:37 +00:00
Nicholas Seckar
1383d1c3b9
Change Fixtures.create_fixtures arity to be backwards compatible
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3694 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-28 00:40:33 +00:00
Jeremy Kemper
3cfea287ba
Speed up class -> connection caching and stale connection verification. Closes #3979 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3693 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-27 21:37:30 +00:00
Nicholas Seckar
ada11d6313
Add set_fixture_class to allow the use of table name accessors with models which use set_default_name. Closes #3935
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3690 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-27 20:29:28 +00:00
David Heinemeier Hansson
018e7f24f0
Only load .yml files in sub-directories
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3685 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-27 05:26:42 +00:00
David Heinemeier Hansson
91247b6167
Added that fixtures to placed in subdirectories of the main fixture files are also loaded ( closes #3937 ) [dblack@wobblini.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3683 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-27 05:14:57 +00:00
David Heinemeier Hansson
adccb319e2
doc fix ( closes #3972 ) [robby]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3682 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-27 05:10:04 +00:00
David Heinemeier Hansson
8203a2afc1
Dont require association classes before theyre supposed to be used ( closes #3976 ) [Rick Olson]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-27 04:45:36 +00:00
Jeremy Kemper
1a06d324df
Define attribute query methods to avoid method_missing calls. Closes #3677 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3679 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-27 00:27:48 +00:00
David Heinemeier Hansson
660952e5b0
CHANGED DEFAULT: ActiveRecord::Base.schema_format is now :ruby by default instead of :sql. This means that we'll assume you want to live in the world of db/schema.rb where the grass is green and the girls are pretty. If your schema contains un-dumpable elements, such as constraints or database-specific column types, you just got an invitation to either 1) patch the dumper to include foreign key support, 2) stop being db specific, or 3) just change the default in config/environment.rb to config.active_record.schema_format = :sql -- we even include an example for that on new Rails skeletons now. Brought to you by the federation of opinionated framework builders! [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3678 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-27 00:23:49 +00:00
David Heinemeier Hansson
c5ff33cd7b
Example for validates_presence_of method ( closes #3966 ) [Robby Russell]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3677 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 23:58:22 +00:00
Jeremy Kemper
6bd8e35136
ActiveRecord::Base.remove_connection explicitly closes database connections and doesn't corrupt the connection cache. Introducing the disconnect! instance method for the PostgreSQL, MySQL, and SQL Server adapters; implementations for the others are welcome. References #3591 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3674 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 23:12:01 +00:00
David Heinemeier Hansson
1215d54c2f
Added support for nested scopes ( closes #3407 ) [anna@wota.jp]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3671 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 20:12:09 +00:00
David Heinemeier Hansson
3d0a9ff437
Aesthetics, baby
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3658 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 00:41:01 +00:00
David Heinemeier Hansson
09751e57b0
Fixed db2 connection with empty user_name and auth options ( closes #3622 ) [phurley@gmail.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3655 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 00:01:13 +00:00
David Heinemeier Hansson
272729e0a3
Fixed validates_length_of to work on UTF-8 strings by using characters instead of bytes ( closes #3699 ) [Masao Mutoh]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3654 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:54:57 +00:00
David Heinemeier Hansson
ad9f678d13
Compatibility patches for calculations
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3653 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:41:51 +00:00
David Heinemeier Hansson
5e99422d61
Updated docs ( closes #3799 ) [ruby@bobsilva.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3651 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:33:08 +00:00
David Heinemeier Hansson
c350291ae7
Fixed that reflections would bleed across class boundaries in single-table inheritance setups ( closes #3796 ) [lars@pind.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3650 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:32:24 +00:00
David Heinemeier Hansson
6b835730de
Makes ActiveRecord::Schema respect AR::Base.table_name_prefix ( closes #3848 ) [rubyonrails@atyp.de]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3648 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:22:04 +00:00
David Heinemeier Hansson
0e37e6678a
Documentation fixes ( closes #3838 )
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3647 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:09:07 +00:00
David Heinemeier Hansson
99307b959b
Added calculations: Base.count, Base.average, Base.sum, Base.minimum, Base.maxmium, and the generic Base.calculate. All can be used with :group and :having. Calculations and statitics need no longer require custom SQL. #3958 [Rick Olson]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3646 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:06:04 +00:00
David Heinemeier Hansson
e9d4b367cc
Renamed Errors#count to Errors#size but kept an alias for the old name (and included an alias for length too) ( closes #3920 , #3320 ) [contact@lukeredpath.co.uk]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3639 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-23 05:09:04 +00:00
Jeremy Kemper
c7d6d68f91
Reflections don't attempt to resolve module nesting of association classes. Simplify type computation.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3637 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-22 18:44:14 +00:00
David Heinemeier Hansson
7a2ce50a93
Improved the Oracle OCI Adapter with better performance for column reflection (from #3210 ), fixes to migrations (from #3476 and #3742 ), tweaks to unit tests (from #3610 ), and improved documentation (from #2446 ) ( closes #3879 ) [Aggregated by schoenm@earthlink.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3623 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-21 00:00:29 +00:00
David Heinemeier Hansson
377bdd02b9
Added :count option to pagination that'll make it possible for the ActiveRecord::Base.count call to using something else than * for the count. Especially important for count queries using DISTINCT #3839 [skaes]. Added :select option to Base.count that'll allow you to select something else than * to be counted on. Especially important for count queries using DISTINCT ( closes #3839 ) [skaes].
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3620 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-20 03:15:22 +00:00
David Heinemeier Hansson
a32a986364
save polymorphic joins from the has_many|one association ( closes #3812 ) [Rick Olson]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3586 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-12 18:03:43 +00:00
Michael Koziarski
5f4b66201e
Allow has_many :through to work with :include [Michael Schoen]. Closes #3611
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3566 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-10 05:19:41 +00:00
Jeremy Kemper
7e6d5b5109
PostgreSQL: smarter schema dumps using pk_and_sequence_for(table). Closes #2920 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3565 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-09 22:09:17 +00:00
Jeremy Kemper
60793cc27f
SQLServer: more compatible limit/offset emulation. Closes #3779 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-09 21:42:29 +00:00
Jeremy Kemper
3a38c829e0
Closes #3784 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3562 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-09 19:47:13 +00:00
Jeremy Kemper
08bda903ec
Update AR default timezone docs.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3561 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-09 19:46:12 +00:00
Jeremy Kemper
b3065a51a9
Polymorphic join support for has_one associations (has_one :foo, :as => :bar). Closes #3785 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3558 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-09 19:37:05 +00:00
Jeremy Kemper
5991e5c789
PostgreSQL: correctly parse negative integer column defaults. References #3776 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3554 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-09 18:06:29 +00:00
Michael Koziarski
d49a5fcb4c
* Fix pagination problems when using include
...
* Introduce Unit Tests for pagination
* Allow count to work with :include by using count distinct.
[Kevin Clark & Jeremy Hopple]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3553 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-09 09:17:40 +00:00
Tobias Lütke
796295dba6
ActiveRecord::RecordInvalid now states which validations failed in its default error message
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3544 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-05 17:39:54 +00:00
David Heinemeier Hansson
0633bb865b
Update versions to match latest from stable
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3543 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-05 00:59:57 +00:00
David Heinemeier Hansson
5cbc062c8a
Just go with Subclasses instead of OnlySubclasses
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3534 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-04 16:26:55 +00:00
David Heinemeier Hansson
ed080863d5
Just go with Subclasses instead of OnlySubclasses
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3533 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-04 06:11:42 +00:00