Commit Graph

2883 Commits

Author SHA1 Message Date
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
03acf48817 Added SIGTRAP signal handler to RailsFCGIHandler that'll force the process into a breakpoint after the next request. This breakpoint can then be caught with script/breakpointer and give you access to the Ruby image inside that process. Useful for debugging memory leaks among other things [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3618 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-19 06:25:47 +00:00
David Heinemeier Hansson
8fb9d7cb4a test_find_or_create_from_two_attributes is a duplicate of test_find_or_create_from_one_attribute (closes #3863) [jp.bougie@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3617 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-19 04:06:37 +00:00
David Heinemeier Hansson
63a95167e8 Also use CWD on document_root (closes #3883) [grant@antiflux.org]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3616 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-19 04:05:27 +00:00
David Heinemeier Hansson
9723d03531 Fix Object.subclasses_of to only return currently defined objects (closes #3882) [Jonathan Viney <jonathan@bluewire.net.nz>]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3607 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-19 01:05:55 +00:00
David Heinemeier Hansson
8896efd41a Ensure backwards compatibility with symbolized action names for render_action (closes #3869) [anna@wota.jp]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3606 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-19 00:46:34 +00:00
David Heinemeier Hansson
1e216b1d84 Updated RDocTask to receive options 1 by 1 (closes #3875) [pterjan@mandriva.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3605 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-19 00:43:10 +00:00
David Heinemeier Hansson
1812dbbfde Make RJS treat symbolic action names nicely #3861 [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3596 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-17 18:32:21 +00:00
Thomas Fuchs
e8c4cc9503 Update script.aculo.us in Rails trunk to V1.5.2
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3595 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-14 10:29:12 +00:00
David Heinemeier Hansson
c7f5a848f1 Refactor the Javascript proxy into a hierarchy for element/collection [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3592 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-14 04:39:44 +00:00
David Heinemeier Hansson
35b74de770 Use real assigns instead of a method call [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3591 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-12 21:31:28 +00:00
David Heinemeier Hansson
5f2292ce39 replace_element was renamed replace [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3590 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-12 21:19:49 +00:00
David Heinemeier Hansson
022a8fc681 Wups, committed too much
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3589 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-12 20:21:01 +00:00
David Heinemeier Hansson
8dc4f46233 Also support replace and replace_html and some refactoring in JavaScriptElementProxy [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3588 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-12 20:10:59 +00:00
David Heinemeier Hansson
ebdb766e79 Added element and collection proxies to RJS [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3587 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-12 18:48:08 +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
David Heinemeier Hansson
b230004897 Changed default lighttpd.conf to use CWD from lighttpd 1.4.10 that allows the same configuration to be used for both detach and not. Also ensured that auto-repeaping of FCGIs only happens when lighttpd is not detached. [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3585 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-12 17:41:53 +00:00
David Heinemeier Hansson
db2023d4d2 The session should be saved even if the filter chain is stopped
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3584 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-12 16:35:15 +00:00
David Heinemeier Hansson
93cba1207a Modernize flash tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3583 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-12 16:29:21 +00:00
David Heinemeier Hansson
431edf7793 Fixed that flash wasnt being cleared after components refactoring yesterday
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3582 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-12 16:18:06 +00:00
David Heinemeier Hansson
ff986f19af Flash shouldnt depend on components either [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3581 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-12 06:11:17 +00:00
David Heinemeier Hansson
050c3964d8 Stopped the massive bleeding of concerns into ActionController::Base. Base no longer knows about flash, filters, or components. This may well have introduced some instability, please do test with apps, especially the ones using components. [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3580 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-12 05:51:02 +00:00
Sam Stephenson
838ec413eb Add JavaScriptGenerator#replace_element for replacing an element's "outer HTML". Closes #3246.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3579 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-12 01:30:13 +00:00
David Heinemeier Hansson
e90bbbdd83 Add caution and restyle components
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3577 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-12 01:06:45 +00:00
David Heinemeier Hansson
137794310b The components module should also contain the options that pertain to it, so collect it all with ClassMethods and InstanceMethods
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3576 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-12 00:46:01 +00:00
Nicholas Seckar
324e5eb571 Fix form_for brokenness due to a shortage of parenthesis
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3575 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-12 00:41:50 +00:00
David Heinemeier Hansson
a8a1d11d77 Expose object and object_name from the FormBuilder [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3574 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-12 00:28:45 +00:00
David Heinemeier Hansson
a04a849d15 Clean up style around form_for and friends a bit
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3573 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-12 00:22:24 +00:00
Nicholas Seckar
344ae8326a Remove over-engineered form_for code for a leaner implementation.
Document form_for's :html option.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3572 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-11 23:29:53 +00:00
Nicholas Seckar
91cdd59b12 Fix constantize to handle names beginning with '::'. Closes #3803.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3571 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-11 18:41:59 +00:00
Michael Koziarski
b9a9893d2b Fix Syntax error in mysql.sql, Drop table readers and run aaa_create_tables first. [Bob Silva] Closes #3798
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3568 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-10 21:32:25 +00:00
Michael Koziarski
06170516c3 Add missing models and fixture
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3567 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-10 06:53:34 +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
7654082260 Major components cleanup and speedup. Closes #3527.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3563 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-09 20:05:11 +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
d424674f1b SQL Server cannot sort on type text. This causes three errors in the activerecord test suite, where tests sort on the comments.body or posts.body columns. This patch changes these columns from text to varchar(4096), allowing these tests to proceed (and pass). All activerecord tests now pass under sqlserver. References #3581. [Tom Ward]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3559 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-09 19:41:32 +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
c326851e4d defaults_test gets a dummy test method so it has at least one test to run
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3557 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-09 19:32:32 +00:00
Jeremy Kemper
d0f3e52f02 Move active_record_store_test.rb to test/activerecord/. Closes #3790.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3556 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-09 19:24:22 +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
Sam Stephenson
803b9a41af Add :html option for specifying form tag options in form_for
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3552 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-08 20:46:15 +00:00
Marcel Molina
73ed47ddec Replace dubious controller parent class in filter docs. Closes #3655, #3722.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3551 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-08 05:24:53 +00:00
Marcel Molina
ba2619f539 Don't interpret the :value option on text_area as an html attribute. Set the text_area's value. Closes #3752.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3550 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-08 05:13:21 +00:00
Scott Barron
a447e82de4 A more aesthetically pleasing implementation and changelog entry
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3549 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-08 03:43:38 +00:00
Scott Barron
2d7309388d Make String#last behave more like Array#last, i.e.
"f".last(3) => "f"  not
"f".last(3) => nil


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3548 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-08 00:49:41 +00:00
Michael Koziarski
49fad6e6d5 Add Configuration#after_initialize for specifying a block to be executed after the framework is completely initialized.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3547 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-07 00:21:45 +00:00