Commit Graph

1729 Commits

Author SHA1 Message Date
Jeremy Kemper
671228942d Alias association #build to #new so it behaves predictably. Closes #8787.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7913 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-15 08:09:04 +00:00
Jeremy Kemper
333463679a Revert [7894] and apply to adapter instead. References #9588.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7912 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-15 07:57:06 +00:00
Jeremy Kemper
660a696a3f Test that change_column quotes column names. Closes #9537 [lawrence]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7909 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-15 07:33:53 +00:00
Jeremy Kemper
9f5a9aa35f Factor out checks for duplicable objects. Closes #9333.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7908 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-15 07:13:40 +00:00
Michael Koziarski
fe234a1538 Fix Json related documentation for render and the AR serializer. Closes #9814. Closes #9833. [chuyeow]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7905 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-15 07:04:10 +00:00
Michael Koziarski
347b911a74 Remove seemingly misleading 'faster tests' instructions too
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7903 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-15 06:48:27 +00:00
Michael Koziarski
0d0fd2142b Update the instructions for running tests.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7902 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-15 06:48:16 +00:00
Jeremy Kemper
e81f1acc33 Uncomment test for join model method_missing. Closes #8707 [Giles Bowkett, Josh Peek]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7897 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-15 04:14:10 +00:00
Jeremy Kemper
619f2897f5 Update test/all.sh
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7896 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-15 03:46:15 +00:00
Jeremy Kemper
6cc7095320 Update IGNORED_SQL for SQL Server. Closes #9638 [lawrence]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7895 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-15 03:32:00 +00:00
Jeremy Kemper
5d3e72486b Add build/drop/rebuild tasks for SQL Server. Closes #9588 [lawrence]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7894 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-15 03:30:47 +00:00
Jeremy Kemper
bfe85ae0e8 Add explicit test task
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7889 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-15 00:10:09 +00:00
Rick Olson
c1bc61cba0 Add notes to documentation regarding attr_readonly behavior with counter caches and polymorphic associations. Closes #9835 [saimonmoore, rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7873 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-14 05:32:57 +00:00
Rick Olson
f56dd107cd Observers can observe model names as symbols properly now. Closes #9869 [queso]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7872 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-14 05:20:24 +00:00
David Heinemeier Hansson
faff774f9d Update versions here too
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7843 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-12 16:03:54 +00:00
Jeremy Kemper
cff25aae90 eval with __FILE__ and __LINE__
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7827 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-10 23:01:18 +00:00
Tobias Lütke
0ad5365bf4 find_and_(initialize|create)_by methods can now properly initialize protected attributes
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7826 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-10 19:11:50 +00:00
Michael Koziarski
1c881ca5bf Ensure that 'autosaving' works when associations aren't loaded [Bryan Helmkamp] References #8713
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7824 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-10 06:45:13 +00:00
Jeremy Kemper
aa04635d8e Update :dependent docs and improve its argument error message.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7813 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-09 00:32:36 +00:00
Jeremy Kemper
cdc3c246c6 belongs_to infers the foreign key from the association name instead of from the class name. Fulfills the 1.2.4 deprecation.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7812 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-08 23:39:28 +00:00
Michael Koziarski
3122d321fd Make sure AR::Base#clone handles attr changes made in after_initialize hooks. Closes #7191 [weyus]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7802 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-08 06:21:38 +00:00
Jeremy Kemper
4eaa8ba5be PostgreSQL: support multiline default values. Closes #7533.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7801 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-08 06:17:53 +00:00
Jeremy Kemper
9319361328 Dr Math meets Captain Obvious.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7798 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-08 05:41:19 +00:00
Jeremy Kemper
346d36bfba Namespace the internal Rakefile tasks. Closes #8850 [drnic]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7795 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-08 05:29:09 +00:00
Jeremy Kemper
85c86f0999 MySQL: fix change_column on not-null columns that don't accept dfeault values of ''. Closes #6663.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7790 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-08 03:28:28 +00:00
Michael Koziarski
ce47db3366 Change Migration documentation to use the new syntax. Closes #9813 [sjgman9]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7788 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-08 03:18:18 +00:00
Jeremy Kemper
210ecaecc3 validates_uniqueness_of behaves well with single-table inheritance. Closes #3833.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7787 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-08 01:44:55 +00:00
Jeremy Kemper
bd087e6716 Use fast date/time parsing by default. Closes #9811.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7780 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 22:01:59 +00:00
Jeremy Kemper
c79dfd36dc Closed wrong ticket. Closes #9802, reopens #9699.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7778 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 19:45:07 +00:00
Jeremy Kemper
84a14f2620 Raise ProtectedAttributeAssignmentError in development and test environments when mass-assigning to an attr_protected attribute. Closes #9699.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7777 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 19:43:19 +00:00
Jeremy Kemper
c7c3f73fd9 Reinstate failsafe date/time parsing rescues. Head off some obvious failures like year == 0 or nil.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7771 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 06:27:39 +00:00
Jeremy Kemper
8d7eb30898 MySQL: speedup date/time parsing.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7769 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 05:29:37 +00:00
Jeremy Kemper
a76fa613d3 Check for the dir instead of relying on an exception.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7768 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 05:25:36 +00:00
Michael Koziarski
cd64471bdb Fix calling .clear on a has_many :dependent=>:delete_all association. [tarmo] Closes #6904
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7767 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 05:05:12 +00:00
Michael Koziarski
5a276643d1 Allow change_column to set NOT NULL in the PostgreSQL adaptor. Closes #3904 [tarmo]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7766 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 04:52:09 +00:00
Jeremy Kemper
fe0df25f7b Move misplaced CHANGELOG entry
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7755 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-06 01:26:48 +00:00
Michael Koziarski
8ef4bc6c75 Missed the add
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7754 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-06 01:03:19 +00:00
Michael Koziarski
638505b90f Send the correct INSERT statement when dealing with objects with only primary keys. Closes #9523 [tarmo]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7753 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-06 00:49:58 +00:00
Michael Koziarski
4db718e2bb Only cache attributes which need it for performance reasons. Closes #9767 [skaes]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7752 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-06 00:48:43 +00:00
Jeremy Kemper
b96c298f47 Test for each JSON fragment to workaround assumed hash ordering.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7751 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-06 00:40:28 +00:00
Jeremy Kemper
55640fb939 Simplify some JSON tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7750 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-06 00:33:51 +00:00
Rick Olson
5b2e8b1eb1 Fix that ActiveRecord would create attribute methods and override custom attribute getters if the method is also defined in Kernel.methods. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7749 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-06 00:25:07 +00:00
Rick Olson
24c2457a26 Don't call attr_readonly on polymorphic belongs_to associations, in case it matches the name of some other non-ActiveRecord class/module. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7748 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-05 19:27:33 +00:00
Jeremy Kemper
335c15005d Bump versions for 1.2.4 release.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7744 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-05 05:20:37 +00:00
Jeremy Kemper
b1968708e1 Hash#to_json takes :only or :except options to specific or omit certain hash keys. Enumerable#to_json passes through its options to each element. Closes #9751.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7736 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-04 03:28:42 +00:00
Jeremy Kemper
a30a1a9d5f Try loading activerecord-<adaptername>-adapter gem before trying a plain require so you can use custom gems for the bundled adapters. Also stops gems from requiring an adapter from an old Active Record gem.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7735 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-04 01:08:10 +00:00
Tobias Lütke
406ea8f31d only create custom accessors for Kernel:: methods
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7731 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-03 21:48:49 +00:00
Tobias Lütke
b31aa639e7 Allow column accessors to be created even if Kernel. or Object# methods of the same name exist.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7729 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-03 20:47:33 +00:00
Michael Koziarski
b4ec9904c6 Cache the descends_from_activerecord? call to speed up query generation. [skaes] Closes #9765
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7723 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-03 05:31:36 +00:00
Jeremy Kemper
0ee1cb2cd3 Ruby 1.9 compat, consistent load paths
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-02 05:32:14 +00:00