Commit Graph

2931 Commits

Author SHA1 Message Date
David Heinemeier Hansson
8203a2afc1 Dont require association classes before theyre supposed to be used (closes #3976) [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-27 04:45:36 +00:00
David Heinemeier Hansson
985cb44110 Added namespaces to all tasks, so for example load_fixtures is now db:fixtures:load. All the old task names are still valid, they just point to the new namespaced names. "rake -T" will only show the namespaced ones, though [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3680 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-27 04:38:39 +00:00
Jeremy Kemper
1a06d324df Define attribute query methods to avoid method_missing calls. Closes #3677.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3679 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-27 00:27:48 +00:00
David Heinemeier Hansson
660952e5b0 CHANGED DEFAULT: ActiveRecord::Base.schema_format is now :ruby by default instead of :sql. This means that we'll assume you want to live in the world of db/schema.rb where the grass is green and the girls are pretty. If your schema contains un-dumpable elements, such as constraints or database-specific column types, you just got an invitation to either 1) patch the dumper to include foreign key support, 2) stop being db specific, or 3) just change the default in config/environment.rb to config.active_record.schema_format = :sql -- we even include an example for that on new Rails skeletons now. Brought to you by the federation of opinionated framework builders! [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3678 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-27 00:23:49 +00:00
David Heinemeier Hansson
c5ff33cd7b Example for validates_presence_of method (closes #3966) [Robby Russell]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3677 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 23:58:22 +00:00
Jeremy Kemper
6bd8e35136 ActiveRecord::Base.remove_connection explicitly closes database connections and doesn't corrupt the connection cache. Introducing the disconnect! instance method for the PostgreSQL, MySQL, and SQL Server adapters; implementations for the others are welcome. References #3591.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3674 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 23:12:01 +00:00
Jeremy Kemper
3848634a4b fix method scoping test for postgresql
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3673 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 23:03:59 +00:00
David Heinemeier Hansson
09f89c4abf Added -r/--repeat option to script/process/spawner that offers the same loop protection as the spinner did. This deprecates the script/process/spinner, so it's no longer included in the default Rails skeleton, but still available for backwards compatibility (closes #3461) [ror@andreas-s.net]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3672 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 20:25:24 +00:00
David Heinemeier Hansson
1215d54c2f Added support for nested scopes (closes #3407) [anna@wota.jp]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3671 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 20:12:09 +00:00
Michael Koziarski
3cfbb4f374 Add around methods to Logger. Closes #3809
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3670 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 19:48:33 +00:00
David Heinemeier Hansson
3d1b51b441 Added .rxml (and any non-rhtml template, really) supportfor CaptureHelper#content_for and CaptureHelper#capture #3287 [Brian Takita]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3669 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 19:47:50 +00:00
Nicholas Seckar
26eaf073c4 Remove ::Controllers related cruft; fix AP tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 17:49:09 +00:00
Thomas Fuchs
d11f8d5516 Added script.aculo.us drag and drop helpers to RJS [Thomas Fuchs]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3667 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 14:20:21 +00:00
David Heinemeier Hansson
6a83ebfe70 Fixed form_for regression (closes #3962) [t.lucas@toolmantim.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3666 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 07:23:42 +00:00
David Heinemeier Hansson
841d596c24 Fixed tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3665 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 04:25:17 +00:00
Nicholas Seckar
55bb615f10 Update duplicated OrderedOptions code.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3664 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 01:56:09 +00:00
David Heinemeier Hansson
647130d7ff Added collision option to template generation in generators (closes #3329) [anna@wota.jp]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3663 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 01:12:58 +00:00
David Heinemeier Hansson
d94af9a61f mail_to shouldnt include language attribute in script tag #3364 [donald.piret@synergetek.be]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3662 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 01:10:05 +00:00
David Heinemeier Hansson
231a464d4e Fixed that form elements would strip the trailing [] from the first parameter (closes #3545) [ruby@bobsilva.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 01:07:05 +00:00
David Heinemeier Hansson
06dd7b8efa The image_tag helper is not converting the options hash to symbols (closes #3615) [agkr@pobox.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3660 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 00:55:22 +00:00
David Heinemeier Hansson
e57bd727df Added Time#beginning_of_quarter (closes #3607) [cohen.jeff@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3659 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 00:46:18 +00:00
David Heinemeier Hansson
3d0a9ff437 Aesthetics, baby
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3658 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 00:41:01 +00:00
David Heinemeier Hansson
ff7be746e0 Added more information to script/plugin's doings to ease debugging #3755 [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 00:37:11 +00:00
David Heinemeier Hansson
ab7c7a8edd Fixed rdoc.options use all over (closes #3639) [andy@tinnedfruit.org]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3656 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 00:04:04 +00:00
David Heinemeier Hansson
09751e57b0 Fixed db2 connection with empty user_name and auth options (closes #3622) [phurley@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3655 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 00:01:13 +00:00
David Heinemeier Hansson
272729e0a3 Fixed validates_length_of to work on UTF-8 strings by using characters instead of bytes (closes #3699) [Masao Mutoh]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3654 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:54:57 +00:00
David Heinemeier Hansson
ad9f678d13 Compatibility patches for calculations
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3653 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:41:51 +00:00
David Heinemeier Hansson
4bd80f110d Make TMail::Mail#has_attachments? use logic from #attachment? (closes #3815) [devslashnull@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3652 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:38:48 +00:00
David Heinemeier Hansson
5e99422d61 Updated docs (closes #3799) [ruby@bobsilva.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3651 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:33:08 +00:00
David Heinemeier Hansson
c350291ae7 Fixed that reflections would bleed across class boundaries in single-table inheritance setups (closes #3796) [lars@pind.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3650 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:32:24 +00:00
David Heinemeier Hansson
67a978be5d rake appdoc fails with unrecognized option (closes #3757) [Jakob S]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3649 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:27:41 +00:00
David Heinemeier Hansson
6b835730de Makes ActiveRecord::Schema respect AR::Base.table_name_prefix (closes #3848) [rubyonrails@atyp.de]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3648 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:22:04 +00:00
David Heinemeier Hansson
0e37e6678a Documentation fixes (closes #3838)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3647 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:09:07 +00:00
David Heinemeier Hansson
99307b959b Added calculations: Base.count, Base.average, Base.sum, Base.minimum, Base.maxmium, and the generic Base.calculate. All can be used with :group and :having. Calculations and statitics need no longer require custom SQL. #3958 [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3646 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:06:04 +00:00
David Heinemeier Hansson
1aea4704dc Added tmp/sessions, tmp/cache, and tmp/sockets as default directories in the Rails skeleton [DHH] Changed the default session configuration to place sessions in tmp/sessions, if that directory is available, instead of /tmp (this essentially means a goodbye to 9/10 White Screen of Death errors and should have web hosting firms around the world cheering) [DHH] Added a default configuration of the FileStore for fragment caching if tmp/cache is available, which makes action/fragment caching ready to use out of the box with no additional configuration [DHH] Changed the default configuration for lighttpd to use tmp/sockets instead of log/ for the FastCGI sockets [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3645 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 20:26:14 +00:00
David Heinemeier Hansson
63f188ceb0 Added that script/generate model will now automatically create a migration file for the model created. This can be turned off by calling the generator with --skip-migration [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3644 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 19:13:04 +00:00
David Heinemeier Hansson
ef338e4de4 Prepare order for uncommenting, use consistent opt options [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3643 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 18:52:52 +00:00
David Heinemeier Hansson
290983be31 Added -d/--database option to the rails command, so you can do "rails --database=sqlite2 myapp" to start a new application preconfigured to use SQLite2 as the database. Removed the configuration examples from SQLite and PostgreSQL from the default MySQL configuration [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3642 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 18:41:13 +00:00
Jeremy Kemper
09993a6073 Allow script/server -c /path/to/lighttpd.conf
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3641 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-23 21:47:34 +00:00
Jeremy Kemper
5a02ee2bd8 fix test for postgresql
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3640 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-23 05:48:29 +00:00
David Heinemeier Hansson
e9d4b367cc Renamed Errors#count to Errors#size but kept an alias for the old name (and included an alias for length too) (closes #3920, #3320) [contact@lukeredpath.co.uk]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3639 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-23 05:09:04 +00:00
Jeremy Kemper
5452383174 Remove hardcoded path to reaper script in script/server.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3638 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-22 22:43:43 +00:00
Jeremy Kemper
c7d6d68f91 Reflections don't attempt to resolve module nesting of association classes. Simplify type computation.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3637 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-22 18:44:14 +00:00
Nicholas Seckar
de54db3c1e Check NameErrors and re-raise if they do not match the expected constant
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3636 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-22 17:29:22 +00:00
Thomas Fuchs
bb7408fd4c Update script.aculo.us to V1.5.3 [Thomas Fuchs]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3634 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-22 09:59:22 +00:00
Thomas Fuchs
523d54b56d Added various InPlaceEditor options, #3746, #3891, #3896, #3906
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3626 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-21 10:52:35 +00:00
David Heinemeier Hansson
7a2ce50a93 Improved the Oracle OCI Adapter with better performance for column reflection (from #3210), fixes to migrations (from #3476 and #3742), tweaks to unit tests (from #3610), and improved documentation (from #2446) (closes #3879) [Aggregated by schoenm@earthlink.net]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3623 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-21 00:00:29 +00:00
David Heinemeier Hansson
e875b0db47 Fixed that the request method would be sticky in tests (closes #3849) [lars@pinds.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3622 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-20 23:49:43 +00:00
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