Commit Graph

5830 Commits

Author SHA1 Message Date
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
Jeremy Kemper
b1e394e67f Builder unbundle message directs to Bulk updating Gem source index for: http://gems.rubyforge.org
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7789 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-08 03:19:39 +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
e7b80cbbbc Create layout dir it's nested. References #9272 [alancfrancis]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7784 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-08 00:54:26 +00:00
Jeremy Kemper
00d9f58f29 Use a configuration check so ActiveRecord can be omitted. References #9699.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7781 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 22:39:44 +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
459cc1ecb8 error_messages_for and friends also work with local variables. Closes #9699.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7779 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 19:50:30 +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
d9f3c435f9 Fix url_for, redirect_to, etc. with :controller => :symbol instead of 'string'. Closes #8562, #9525.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7776 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 19:12:02 +00:00
Jeremy Kemper
c90d31eb37 Correct BufferedLogger#level? checks. Closes #9806.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7775 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 18:54:36 +00:00
Jeremy Kemper
2101c25faf Reference current fast_xs URL
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7774 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 09:22:03 +00:00
Jeremy Kemper
845e6ff45a String#to_xs uses the fast_xs extension if available for Builder speedup.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 09:15:26 +00:00
Jeremy Kemper
4430a00c04 BlankSlate -> BasicObject
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7772 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 06:45:01 +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
98f50607e1 Axe excess backtracery.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7770 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 06:09:54 +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
Michael Koziarski
907d6ce285 Extend the console +helper+ method to allow you to include custom helpers. Closes #6781 [Chris Wanstrath]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7765 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 03:08:08 +00:00
Michael Koziarski
f29ae12535 Add Base#to_param to Active Resource that quacks like ActiveRecord. Closes #9557 [bradediger]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7764 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 02:13:51 +00:00
Jeremy Kemper
f118a5b05b BlankSlate -> BasicObject
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7763 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 02:08:05 +00:00
Jeremy Kemper
34b576700d Introduce BasicObject as Builder::BlankSlate for Ruby 1.9 forward compatibility.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7762 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 01:07:00 +00:00
Jeremy Kemper
1f5c4365a7 Unbundle Builder in favor of a gem dependency.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7761 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-07 01:05:42 +00:00
Jeremy Kemper
52ca5dad1e Use StringIO and Tempfile subclasses instead of defining singleton methods on each multipart field.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7759 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-06 11:40:13 +00:00
Jeremy Kemper
3405fb3dea Rewind stdin if possible after multipart parsing.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7758 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-06 09:39:31 +00:00
Jeremy Kemper
551f6e9bee Don't generate strings to log unless they'll actually get logged.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7757 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-06 09:28:50 +00:00
Jeremy Kemper
89eb53395b Typo
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7756 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-06 01:38:58 +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
58a5eef53e Disambiguate Time, Date, and DateTime#to_json formatting. Closes #9750.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7746 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-05 09:43:24 +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
David Heinemeier Hansson
0068a8a1d8 Remember these for the next release
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7743 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-05 04:44:04 +00:00
Jeremy Kemper
d0755b9814 Disabling auto_flushing still flushes when the buffer hits a maximum size, as a failsafe against memory-gobbling.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7739 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-04 19:52:10 +00:00
Michael Koziarski
41bfedeac2 Tidy up framework initialization code to ensure that it doesn't add folders to the load path that it doesn't intend to require.
Work around mongrel swallowing LoadErrors to ensure that users get more helpful errors if active_resource is required but not missing.  [mislav] Closes #9743


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7738 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-04 04:16:06 +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
Jeremy Kemper
f2d7e51da2 Explicitly convert the buffer array to a string before writing to head off compatibility issues with outputs that don't fully quack like an IO.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7734 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-03 23:56:34 +00:00
Jeremy Kemper
d9dac76f53 Some platforms include colon in timezone offset, some don't. References #9744.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7733 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-03 23:54:45 +00:00
Jeremy Kemper
748e6873c2 BufferedLogger#auto_flushing = N flushes the log every N messages. Buffers with an array instead of string.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7732 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-03 23:43:12 +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