Commit Graph

3100 Commits

Author SHA1 Message Date
Rick Olson
fa4fb50186 fix calculation tests to get around inconsistent ordering of nils
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3872 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-15 03:50:47 +00:00
Michael Koziarski
c42cd3c383 make save! return true on success[johan@johansorensen.com]. Closes #4173
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3871 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-15 02:32:14 +00:00
Michael Koziarski
c32fa73ea1 Unit test fixes for postgresql.
Allow to_xml tests to pass in time zones other than CST.



git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3870 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-15 02:17:31 +00:00
Michael Koziarski
9de81036dd Switch to_xml to use the date formate defined in xml schema.[Koz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3869 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-15 02:15:01 +00:00
Michael Koziarski
eccf39203f Correct syntax error in postgresql schema definition
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3868 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-15 01:31:00 +00:00
Jamis Buck
953d7c9aa4 Make the xml_http_request testing method set the HTTP_ACCEPT header
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3867 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-14 19:53:27 +00:00
Rick Olson
4965a754d5 Catch FixtureClassNotFound when using instantiated fixtures on a fixture that has no ActiveRecord model [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3866 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-14 15:15:06 +00:00
Rick Olson
796a43dead Allow ordering of calculated results and/or grouped fields in calculations [solo@gatelys.com] closes #4228
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3865 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-14 14:59:14 +00:00
Michael Koziarski
c6abe81b1e Add verification to scaffolds (generated and reflection based). Require POST for unsafe actions [Michael Koziarski]. Closes #2601
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3864 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-14 01:57:12 +00:00
Tobias Lütke
e9d6fea533 Don't replace application.js in public/javascripts if it already exists [Cody Fauser]. Closes #4195
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3863 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-13 18:45:40 +00:00
Jeremy Kemper
25fb2db409 Dynamically set allow_concurrency. Closes #4044.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3862 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-13 17:28:55 +00:00
Nicholas Seckar
8ff4463193 Simplify controller_path
Cache File.directory? calls to avoid filesystem calls when using layouts


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3861 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-13 15:54:33 +00:00
David Heinemeier Hansson
97dd9a91c2 Always use application/xml, then the charset is determined by the XML doc
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3860 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-13 05:51:55 +00:00
David Heinemeier Hansson
928627292c The mere existance of a rjs file shouldnt cause the layout to disappear. Made it easier to specify a :with on observer_field
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3859 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-13 03:29:39 +00:00
David Heinemeier Hansson
75b8a66638 The mere existance of a rjs file shouldnt cause the layout to disappear. Made it easier to specify a :with on observer_field
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3858 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-13 03:27:26 +00:00
Nicholas Seckar
c07c48d10a Delay rake:uncommitted's execution of svn status
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3857 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-13 03:21:09 +00:00
Sam Stephenson
3589871de8 Added simple alert() notifications for RJS exceptions when config.action_view.debug_rjs = true. Set debug_rjs = true for the default development environment.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3856 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-13 02:11:59 +00:00
David Heinemeier Hansson
955583aed4 Prefer application/xml over text/xml for charset reasons
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3855 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-13 02:05:59 +00:00
David Heinemeier Hansson
06c2b43f36 Rendering xml shouldnt happen inside any layout. Added class proxying to RJS, so you can call page.field.clear("my_field") to generate Field.clear("my_field");. Added :content_type option to render, so you can change the content type on the fly. Do type/subtype reordering of Accept header preferences for xml types (aka make Firefox work with respond_to). CHANGED DEFAULT: The default content type for .rxml is now application/xml instead of type/xml, see http://www.xml.com/pub/a/2004/07/21/dive.html for reason
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3852 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-13 01:33:57 +00:00
Sam Stephenson
c5d5c4f708 Use require_library_or_gem to load rake in commands/server.rb. Closes #4205.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3851 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-12 23:00:28 +00:00
David Heinemeier Hansson
60e40647d7 Prepare for mime type reordering depending on the branch [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3850 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-12 19:01:09 +00:00
David Heinemeier Hansson
09cec78248 Default mime type for XML should be application/xml [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3849 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-12 18:50:14 +00:00
Sam Stephenson
e3ea34f7d3 Use the Rake API instead of shelling out to create the tmp directory in commands/server.rb
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3848 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-12 17:04:33 +00:00
David Heinemeier Hansson
de37f7df4f Mime types are separated by a comma, not semicolon, in the Accept header. Also switch all internal configuration of mime types away from strings and over to Mime::Type [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3847 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-12 16:03:44 +00:00
David Heinemeier Hansson
3a90c31a56 Use accept headers
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3845 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-12 06:04:03 +00:00
David Heinemeier Hansson
7af12d04ce Added synonym and custom type handling to respond_to [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3844 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-12 06:02:44 +00:00
David Heinemeier Hansson
9e2932f816 Assume that we accept what we give [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3843 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-12 05:13:55 +00:00
David Heinemeier Hansson
de660957a5 Added defaults to respond_to [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3842 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-12 03:39:58 +00:00
David Heinemeier Hansson
6e3e5cadfb Added option to render action/template/file of a specific extension (and here by template type). This means you can have multiple templates with the same name but a different extension [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3841 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-12 01:56:55 +00:00
Jamis Buck
8e8b6b9e40 More integration testing tweaks
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3840 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-12 00:08:26 +00:00
Nicholas Seckar
77e2f00c28 Don'tt abort rake when rendering the _trace.rhtml template
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3839 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-11 02:53:39 +00:00
David Heinemeier Hansson
1c16649b48 Added better support for using the same actions to output for different sources depending on the Accept header [DHH] Added Base#render(:xml => xml) that works just like Base#render(:text => text), but sets the content-type to text/xml and the charset to UTF-8 [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3838 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-11 01:23:29 +00:00
Jamis Buck
8152695b80 Make assertions in integration sessions proxy to the test instance (only for sessions created via open_session)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3836 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-10 18:00:53 +00:00
David Heinemeier Hansson
51d6bc2807 Passing comment
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3835 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-10 17:28:21 +00:00
Jamis Buck
bfbbd4c346 make sure nil @session doesn't mess up wsod stacktraces
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3834 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-10 14:41:37 +00:00
David Heinemeier Hansson
ffec8c6b00 tag! is nicer than __send__
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3833 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-10 04:37:27 +00:00
David Heinemeier Hansson
3442e0c671 Added options to control the :only/:except for included associations on Base#to_xml [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3832 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-10 03:50:00 +00:00
David Heinemeier Hansson
db37c0c95f Added association inclusion in to_xml [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3831 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-10 00:25:29 +00:00
David Heinemeier Hansson
0c6d178552 Implemented nested to_xml and named elements for array xmling [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3830 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-09 23:35:43 +00:00
David Heinemeier Hansson
d872281975 Fixed to_xml across the board to use nice indention, better skip_attributes workings, no type on strings, and cleaned tests [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3829 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-09 21:12:28 +00:00
Jamis Buck
966c276d60 Fix counter cache setting in belongs-to proxy
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3828 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-09 20:55:14 +00:00
Jamis Buck
532f9d484c Add suppress_messages to migrations, to temporarily turn off verbose messages
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3827 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-09 18:38:39 +00:00
Jamis Buck
b95b09f32d a few more tests for the custom counter_cache naming code
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3826 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-09 18:11:41 +00:00
Jamis Buck
87898badba Allow counter_cache to accept a column name
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3825 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-09 17:23:57 +00:00
Thomas Fuchs
130001c377 Update to latest script.aculo.us trunk, fixes possible issue with Effect.Appear on IE
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3824 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-09 09:59:29 +00:00
Michael Koziarski
57565b3506 format fix for locking [Michael Koziarski]
Add documentation for :dependent on associations. [robby@planetargon.com] Closes #4151


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3822 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-09 08:40:34 +00:00
Michael Koziarski
43398433e9 Added a note to the documentation for the Date related Numeric extensions to indicate that they're
approximations and shouldn't be used for critical calculations. [Koz].  Closes #4148.  References #4146


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3821 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-09 07:37:51 +00:00
Jamis Buck
5568d20b2e Move methods from TestResponse into a module, so they can be shared with response objects in integration tests. (This allows standard functional test assertions to be used in integration tests, like assert_response and assert_template.)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3820 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-09 04:57:08 +00:00
Tobias Lütke
aafc191ab7 Integration test's url_for now runs in the context of the last request (if any) so after post /products/show/1 url_for :action => 'new' will yield /product/new
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3819 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-08 20:12:30 +00:00
Rick Olson
47ffc04621 move vendor inside lib so that rake freeze_edge works
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3818 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-08 16:54:57 +00:00