Commit Graph

52664 Commits

Author SHA1 Message Date
David Heinemeier Hansson
8a40c6b522 Fixed has_and_belongs_to_many guessing of foreign key so that keys are generated correctly for models like SomeVerySpecialClient [Florian Weber]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@69 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-07 12:33:42 +00:00
David Heinemeier Hansson
ea759cb761 Added counter_sql option for has_many associations [bitsweat]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@68 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-07 12:25:01 +00:00
David Heinemeier Hansson
465e0c0c26 Added the possibility of having validate be protected for assert_(in)valid_column #263 [Tobias Luetke]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@67 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-07 12:18:33 +00:00
David Heinemeier Hansson
1e4a936bd0 Trick tests on url_for
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@66 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-07 12:17:17 +00:00
David Heinemeier Hansson
8e4edec877 Fixed that methods wrapped in callbacks still return their original result #260 [bitsweat]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@65 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-07 12:10:57 +00:00
David Heinemeier Hansson
a6f718cfa0 Make the dispatch.rb behave after being run by the WEBrick dispatcher
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@64 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-07 12:03:57 +00:00
David Heinemeier Hansson
2594581e9f Added a better generator for scaffolding that actually creates the code, so it can be edited bit by bit. See "script/generate scaffold" [bitsweat]. Added a whole new approach to generators that used the shared "script/generate" command. Run with no-args to see help [bitsweat].
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@63 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-07 11:49:38 +00:00
David Heinemeier Hansson
3ee4357b86 Added that ActiveRecordHelper#form now calls url_for on the :action option.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@62 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-07 11:43:21 +00:00
David Heinemeier Hansson
63c4e789b5 Fixed a bug with the HEAD stuff
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@61 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-07 11:32:42 +00:00
David Heinemeier Hansson
b4f4d038b9 Fixed the Inflector to handle the movie/movies pair correctly #261 [Scott Baron]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@60 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-07 11:15:41 +00:00
David Heinemeier Hansson
d1856a00a3 Documentation bugs
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@59 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-07 11:12:05 +00:00
David Heinemeier Hansson
a544d7aa37 Added all the HTTP methods as alternatives to the generic "process" for functional testing #276 [Tobias Luetke]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@58 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-07 11:10:46 +00:00
David Heinemeier Hansson
94921293db Added indifference to whether @headers["Content-Type"], @headers["Content-type"], or @headers["content-type"] is used. Added proper handling of HEAD requests, so that content isnt returned (Request#head? added as well) #277 [Eric Hodel]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@57 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-07 10:50:26 +00:00
David Heinemeier Hansson
3e7d191e64 Added bind-style variable interpolation for the condition arrays that uses the adapter's quote method [Michael Koziarski]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@56 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-07 10:37:50 +00:00
David Heinemeier Hansson
5e3eaff5bb Added CSV format for fixtures #272 [what-a-day]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@55 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-07 10:24:13 +00:00
David Heinemeier Hansson
165097ede5 Added access to custom headers, like cc, bcc, and reply-to #268 [Andreas Schwarz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@54 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-07 09:10:50 +00:00
David Heinemeier Hansson
35c89c4176 Fixed fixtures using primary key fields called something else than "id" #270 [dave]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@53 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-06 18:56:49 +00:00
David Heinemeier Hansson
7cc27b7b79 Added TestSession#session_id that returns an empty string to make it easier to functional test applications that doesn't use cookie-based sessions #275 [jcf]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@52 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-06 18:51:04 +00:00
David Heinemeier Hansson
0ffb6c1625 Syntax errors and other exceptions thrown outside of an action are now gracefully handled by the dispatcher
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@51 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-06 18:25:01 +00:00
David Heinemeier Hansson
ed14042fea Cleaned it up
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@50 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-06 18:19:56 +00:00
David Heinemeier Hansson
456076a306 Added an easier way of starting a IRB session on the environment
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@49 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-06 18:19:24 +00:00
David Heinemeier Hansson
0366e6a614 Added an easier way of starting a IRB session on the environment
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@48 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-06 18:18:29 +00:00
David Heinemeier Hansson
6c975dc643 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@47 5ecf4fe2-1ee6-0310-87b1-e25e094e27de 2004-12-06 18:14:24 +00:00
David Heinemeier Hansson
2575b3b065 Added extra words of caution for guarding against SQL-injection attacks
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@46 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-06 18:08:35 +00:00
David Heinemeier Hansson
6cc961555d Fixed that cached template loading would still check the file system to see if the file existed #258 [Andreas Schwarz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@43 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-01 16:10:40 +00:00
David Heinemeier Hansson
9a248a83b5 Dont include the primary key in updates -- its unneeded and SQL Server chokes on it
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@42 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-01 15:20:53 +00:00
David Heinemeier Hansson
005371e16c Added options to tailor header tag, div id, and div class on ActiveRecordHelper#error_messages_for [josh]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@41 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-01 13:59:16 +00:00
David Heinemeier Hansson
0daa29ece2 Added proper handling of time fields that are turned into Time objects with the dummy date of 2000/1/1 [HariSeldon]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@40 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-01 13:18:51 +00:00
David Heinemeier Hansson
50f333b203 Added graceful handling of non-alphanumeric names and misplaced brackets in input parameters [bitsweat]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@39 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-01 12:57:16 +00:00
David Heinemeier Hansson
79e85edd71 Added reverse order of deleting fixtures, so referential keys can be maintained #247 [Tim Bates]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@38 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-01 12:25:04 +00:00
David Heinemeier Hansson
d4d981d707 Added a real reference to the irc channel, and updated the name of the network to the right name in the Rails docs [imajes]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@37 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-01 12:10:02 +00:00
David Heinemeier Hansson
9200dad7c9 script/new_controller should create directory for views even when no actions are specified [bitsweat]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@36 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-01 12:07:07 +00:00
David Heinemeier Hansson
eec4638eb6 Fixed infinite loop when environment is missing in database.yml
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@35 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-01 11:28:52 +00:00
David Heinemeier Hansson
bc80460115 Added relative path search for sqlite dbfiles in database.yml (if RAILS_ROOT is defined) #233 [bitsweat]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@34 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-01 11:26:47 +00:00
David Heinemeier Hansson
d6d875bfb4 Moved the global require_* out of the classes so they actually work without stack overflows
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@33 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-30 19:13:34 +00:00
David Heinemeier Hansson
d82f73ecab Abolished ActionController::Base.require_or_load in favor of require_dependency and ActiveRecord::Base.require_or_load in favor of require_association. Both methods are now also available in the global namespace when you need to require dependencies or associations outside of whats done automatically.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@32 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-30 18:52:20 +00:00
David Heinemeier Hansson
5b38d85571 AbstractApplicationController and the individual controllers are now completely reloaded on each request if "reload_dependencies" is set to true. This makes it possible to REMOVE methods and constants and have the changes reflected. Beaware that this is still not possible for models, though.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@31 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-30 17:19:01 +00:00
David Heinemeier Hansson
38e5fe97be Pass on the original exception
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@30 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-30 17:11:40 +00:00
David Heinemeier Hansson
2fc559a4ca A change in attempt to combat periodical errors with FCGI processes hanging for a long time before returning the response
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@29 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-30 17:11:14 +00:00
David Heinemeier Hansson
bcfd649de8 Silenced warnings from reloading files
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@28 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-30 17:10:32 +00:00
David Heinemeier Hansson
ac3c8a54f8 Silence errors occurring when reloading classes
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@27 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-30 16:25:08 +00:00
David Heinemeier Hansson
a682d20873 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@26 5ecf4fe2-1ee6-0310-87b1-e25e094e27de 2004-11-26 16:33:23 +00:00
David Heinemeier Hansson
9e1fb3235d Handle empty cookie jars gracefully -- dont pout!
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@25 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-26 16:30:44 +00:00
David Heinemeier Hansson
55af595214 Renamed CookieContainer to CookieJar to be cute. Its a private container anyway, so what do you care?
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@24 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-26 14:52:59 +00:00
David Heinemeier Hansson
08a2249e90 Report to logger when a cookie is set
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@23 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-26 02:16:05 +00:00
David Heinemeier Hansson
177cae5483 Allow symbols to be used as names for setting cookies
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@22 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-26 02:11:42 +00:00
David Heinemeier Hansson
defda16b83 Allow symbols to be used as keys for setting cookies
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@21 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-26 02:09:38 +00:00
David Heinemeier Hansson
d0c90331f1 Added a new container for cookies that makes them more intuative to use. The old methods of cookie and @cookies have been deprecated.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@20 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-26 02:04:35 +00:00
David Heinemeier Hansson
b62937acbd Added ActionController#cookies[]= as an alias for cookie "name", "value" -- youll still need to use the latter if you have options to set.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@19 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-26 01:12:46 +00:00
David Heinemeier Hansson
bd5985331c Added ActionController#cookies[] as a reader for @cookies that'll return the value of the cookie instead of the cookie object itself. NOTE: If you were using the old accessor, this could potentially break your code -- if you expect a full cookie object!
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@18 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-26 01:09:59 +00:00