Commit Graph

5105 Commits

Author SHA1 Message Date
Jeremy Kemper
673daeabca Fixtures: people(:technomancy, :josh) returns both fixtures. Closes #7880.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6940 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-05 03:47:02 +00:00
Jeremy Kemper
d6785e9674 Fix indentation in model generator migration template. Closes #8577 [Josh Peek]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6939 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-05 03:34:56 +00:00
Jeremy Kemper
6204a52fac Sexy migrations for the session_migration generator. Closes #8561.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6938 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-05 02:42:57 +00:00
Jeremy Kemper
1b32a305df Add Date#since, ago, beginning_of_day, and end_of_day. Date + seconds works now. Closes #8575.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6937 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-04 22:00:53 +00:00
Jeremy Kemper
4685fa0c20 String#to_time overflows to DateTime. Add String#to_datetime. Closes #8572.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6935 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-04 19:49:13 +00:00
Jeremy Kemper
601778e38a Date.yesterday and .tomorrow. Closes #8571.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6934 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-04 18:14:42 +00:00
Jeremy Kemper
1312259294 Readable Date and DateTime#inspect. Closes #8570.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6933 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-04 17:49:43 +00:00
Thomas Fuchs
3cfb894bac Allow JSON-style values for the :with option of observe_field. Closes #8557 [kommen]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6930 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-03 14:27:43 +00:00
Tobias Lütke
13058b0188 Enhance assert_difference to accept arrays of strings which are then evaled
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6926 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-01 20:20:19 +00:00
Rick Olson
4d1c87a069 pass the prefix_options to the instantiated record when using find without a specific id. Closes #8544 [alloy]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6925 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-01 17:14:14 +00:00
David Heinemeier Hansson
846e858727 Added proper handling of arrays (closes #8537) [hasmanyjosh]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6924 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-01 06:48:09 +00:00
Jeremy Kemper
83ce4c59be Remove RAILS_ROOT from backtrace paths. Closes #8540.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6923 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-01 05:18:21 +00:00
Jeremy Kemper
8ce5479307 Routing: map.resource :logo routes to LogosController so the controller may be reused for multiple nestings or namespaces.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6922 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-01 04:40:30 +00:00
Jeremy Kemper
507da04a14 Move common DateTime calculations to Date. Closes #8536.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6921 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-01 04:03:46 +00:00
Jeremy Kemper
a6a1dc967c render :partial recognizes Active Record associations as Arrays. Closes #8538.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6920 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-01 03:53:39 +00:00
Jeremy Kemper
b05fc40b5d Calculations support non-numeric foreign keys. Closes #8154.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6919 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-01 03:26:51 +00:00
Jeremy Kemper
6435ecc68a Missing helper load error shouldn't shadow load errors within the helper itself.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6914 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-31 19:07:57 +00:00
Jeremy Kemper
d0360a4d5c Base.inspect handles Base itself and abstract_class? Don't use #<Foo ...> since that notation's typically used for instances of a class, not the class itself. Closes #8490 [deepblue]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6913 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-31 17:31:33 +00:00
Jeremy Kemper
8158455ded Fix an edge case with find with a list of ids, limit, and offset. Closes #8437.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6912 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-31 17:15:56 +00:00
David Heinemeier Hansson
0cf79f07b0 Fixed that DateHelper#date_select should set the day to the 1st when its a hidden option and the month is visible (or invalid dates can be produced) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6911 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-31 16:38:36 +00:00
David Heinemeier Hansson
ff5c7c8c40 Added Date#change (like Time#change) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6910 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-31 16:37:09 +00:00
Jeremy Kemper
1edd21bb02 with_scope is protected. Closes #8524.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6909 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-30 21:40:55 +00:00
Jeremy Kemper
962b12fb9f Fix imprecise duration addition test. Closes #8516 [Geoff Buesing]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6906 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-30 07:21:14 +00:00
Jeremy Kemper
ff6d2aae0a Quickref for association methods. Closes #7723.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6905 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-30 07:05:14 +00:00
Jeremy Kemper
1f802968c5 Calculations: return nil average instead of 0 when there are no rows to average. Closes #8298.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6904 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-30 06:57:04 +00:00
Jeremy Kemper
b2681cca2e acts_as_nested_set: direct_children is sorted correctly. Closes #4761.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6903 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-30 06:34:25 +00:00
Jeremy Kemper
b7d2dae6dc DateTime#to_time converts to Time unless out of range. Date#to_datetime and Date#to_s(:rfc822). Closes #8512.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6902 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-30 06:24:32 +00:00
Jeremy Kemper
6503da6991 Time durations use since instead of + for accuracy. Closes #8513.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6901 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-30 06:21:08 +00:00
Jeremy Kemper
a1c88273f4 Skip databases that couldn't be created.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6900 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-30 05:39:49 +00:00
Jeremy Kemper
186ac4cdaa Don't choke on nested helpers.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6899 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-29 22:06:13 +00:00
Jeremy Kemper
34a5a896e1 Missed svn add from [6897]. References #8393.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6898 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-29 21:49:37 +00:00
Jeremy Kemper
3cf2c63eee Console reload! runs to_prepare callbacks also. Closes #8393.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6897 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-29 21:44:35 +00:00
Jeremy Kemper
af98d883b9 Raise an exception if both attr_protected and attr_accessible are declared. Closes #8507, #6004.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6896 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-29 20:35:46 +00:00
Rick Olson
32b307bc32 fix test cases to match new json output. Closes #8371
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6894 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-29 09:42:13 +00:00
Rick Olson
0345c97587 escape <'s and >'s in JSON strings. #8371 [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6893 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-29 09:10:36 +00:00
Jeremy Kemper
ae242b0d23 Workaround test isolation failure with Task.attr_protected :starting.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6892 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-29 08:29:33 +00:00
Jeremy Kemper
690d6e204a Typo in PostgreSQL change_column quoting. References #8466.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6891 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-29 08:06:35 +00:00
Jeremy Kemper
c2d14836a1 Missed Oracle rename_column quoting. References #8466.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6890 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-29 07:40:59 +00:00
Jeremy Kemper
69e4cc6e31 SQLite, MySQL, PostgreSQL, Oracle: quote column names in column migration SQL statements. Closes #8466.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6889 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-29 07:21:41 +00:00
Jeremy Kemper
8139de2812 Routing: drop semicolon and comma as route separators.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6888 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-29 06:40:33 +00:00
Jeremy Kemper
d3017e225f Correct flash discard rdoc. Closes #8502 [kampers]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6887 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-29 02:42:31 +00:00
Jeremy Kemper
af2ebb29da Inflections: MatrixTest -> MatrixTests instead of MatricesTest. Closes #8496.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6886 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-29 02:40:34 +00:00
Jeremy Kemper
9e76583e8e Update CHANGELOG attribution.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-29 02:13:53 +00:00
Jeremy Kemper
20fa105c35 Wordsmith generator USAGEs.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6884 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-29 02:07:08 +00:00
Jeremy Kemper
06744bb4c5 Generated migrations include timestamps by default. Closes #8501.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6883 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-29 00:11:56 +00:00
Jeremy Kemper
428d1f67da Multibyte strings respond_to the String methods they proxy so they can be duck-typed. Closes #6549.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6882 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-28 23:33:54 +00:00
Jeremy Kemper
d8b67f7fe1 Generate rdoc with utf-8 charset. Closes #7188 [manfred, jferris]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6881 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-28 22:55:14 +00:00
Rick Olson
4472a30aad Allow nil serialized attributes with a set class constraint. #7293 [sandofsky]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6879 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-28 15:51:53 +00:00
Jeremy Kemper
6f6328787c Test that DateTime are quoted as DateTime not Date. Closes #8364 [chas]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6878 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-28 05:55:27 +00:00
Jeremy Kemper
e5b3d4b3b5 request.remote_ip understands X-Forwarded-For addresses with nonstandard whitespace. Closes #7386.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6877 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-28 00:10:13 +00:00