Commit Graph

185 Commits

Author SHA1 Message Date
David Heinemeier Hansson
6860db61f5 Renamed Mixins to Acts to resemble the change from include ActiveRecord::Mixins::List to acts_as_list and renamed @@default_error_messagess to @@default_error_messages
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@190 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-16 16:23:59 +00:00
David Heinemeier Hansson
12f10f6baf Only requests that require processing from a controller should block the webrick server -- requests for stylesheets, images, and the like should be concurrent
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@189 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-16 16:08:10 +00:00
David Heinemeier Hansson
c4c6af3c2c Needed to update the server root for the new placement
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@188 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-16 15:57:06 +00:00
David Heinemeier Hansson
cc88e5a615 Renamed script/envcon to script/console
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@187 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-16 15:47:04 +00:00
David Heinemeier Hansson
b8f8776f0c Renamed public/dispatch.servlet to script/server -- it wasn't really dispatching anyway as its delegating calls to public/dispatch.rb
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@186 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-16 15:45:55 +00:00
David Heinemeier Hansson
4fb6ed4c1c Renamed breakpointing to breakpointer
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@185 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-16 15:40:50 +00:00
David Heinemeier Hansson
c5d6aa2b18 Added option for turning off the automated timestamps
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@184 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-16 15:21:16 +00:00
David Heinemeier Hansson
87297f1c4b Added assumption that a Symbol-based scope should end in _id unless it does so already and that you can pass vanilla string-based scopes as a parameter
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@183 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-16 13:42:21 +00:00
David Heinemeier Hansson
4d6bfc7a36 Added assumption that a Symbol-based scope should end in _id unless it does so already and that you can pass vanilla string-based scopes as a parameter
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@182 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-16 13:37:06 +00:00
David Heinemeier Hansson
2dbff3fbc0 Make it possible to use a regular scope string in addition to the symbol shortcut
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@181 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-16 13:22:57 +00:00
David Heinemeier Hansson
cf718eb707 Shouldnt have removed generators from gemspec
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@180 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-16 13:12:10 +00:00
David Heinemeier Hansson
f296e117c6 Added Base.validates_inclusion_of that validates whether the value of the specified attribute is available in a particular enumerable object. [what-a-day]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@179 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-16 03:23:06 +00:00
David Heinemeier Hansson
f7f1fee765 Added Base.validates_inclusion_of that validates whether the value of the specified attribute is available in a particular enumerable object. [what-a-day]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@178 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-16 03:17:43 +00:00
David Heinemeier Hansson
d8a58eea11 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@177 5ecf4fe2-1ee6-0310-87b1-e25e094e27de 2004-12-16 03:01:11 +00:00
David Heinemeier Hansson
1f916a119c Added that Active Records will automatically record creation and/or update timestamps of database objects if fields of the names created_at/created_on or updated_at/updated_on are present. [Tobias Luetke] Added acts_as_tree that can decorates an existing class with a many to many relationship with itself. Added acts_as_list that can decorates an existing class with methods like move_higher/lower, move_to_top/bottom.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@176 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-16 02:49:18 +00:00
David Heinemeier Hansson
8bc82278dd Added that controllers will now attempt to require a model dependency with their name and in a singular attempt for their name.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@175 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-16 02:06:11 +00:00
David Heinemeier Hansson
1579f3b45d Added Base.validates_format_of that Validates whether the value of the specified attribute is of the correct form by matching it against the regular expression provided. [Marcel]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@174 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-16 01:32:35 +00:00
David Heinemeier Hansson
01e9b7c305 Added Base.default_error_messages as a hash of all the error messages used in the validates_*_of so they can be changed in one place [Tobias Luetke]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@173 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-15 22:20:22 +00:00
David Heinemeier Hansson
91b97eca86 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@172 5ecf4fe2-1ee6-0310-87b1-e25e094e27de 2004-12-15 16:35:36 +00:00
David Heinemeier Hansson
7500a54692 Added automatic transaction block around AssociationCollection.<<, AssociationCollection.delete, and AssociationCollection.destroy_all
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@171 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-15 15:09:44 +00:00
David Heinemeier Hansson
120649dc83 Moved generate to bin and included it again
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@170 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-15 14:19:22 +00:00
David Heinemeier Hansson
0a97c05ba0 Removed redundent tests for success and removed the tests for missing records that were failing out the gates
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@169 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-15 13:20:55 +00:00
David Heinemeier Hansson
0802ca7095 Generators shouldnt be placed in a new Rails creation by default
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@168 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-15 13:18:40 +00:00
David Heinemeier Hansson
db6179d12f Fixed DateHelper#date_select so that you can pass include_blank as an option even if you don't use start_year and end_year #59 [what-a-day]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@167 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-15 12:47:50 +00:00
David Heinemeier Hansson
846a1236bc Added Base.validates_boundries_of that delegates to add_on_boundary_breaking #312 [Tobias Luetke]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@166 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-15 12:29:08 +00:00
David Heinemeier Hansson
83c668f32e Make Railties *not* include .svn dirs in its gemspec files list #308 [Marcel]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@165 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-15 12:04:50 +00:00
David Heinemeier Hansson
57ed93ee66 Fixed that Base#find will return an array if given an array -- regardless of the number of elements #270 [Marten]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@164 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-15 11:55:43 +00:00
David Heinemeier Hansson
df28bdd7ab Documented select, collection_select, and country_select #304 [Ulysses]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@163 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-15 11:49:23 +00:00
David Heinemeier Hansson
d96e874e0f Insignificante...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@162 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-15 11:41:52 +00:00
David Heinemeier Hansson
232443062e Updated examples to use ApplicationController instead of AbstractApplicationController
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@161 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-15 11:40:11 +00:00
David Heinemeier Hansson
17a74d90b6 Added that controllers will now search for a layout in $template_root/layouts/$controller_name.r(html|xml), so PostsController will look for layouts/posts.rhtml or layouts/posts.rxml and automatically configure this layout if found #307 [Marcel]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@160 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-15 11:39:22 +00:00
David Heinemeier Hansson
4d9cda5732 Renamed AbstractApplicationController and abstract_application.rb to ApplicationController and application.rb, so that it will be possible for the framework to automatically pick up on app/views/layouts/application.rhtml and app/helpers/application.rb
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@159 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-15 11:30:09 +00:00
David Heinemeier Hansson
a02a96226e Brought unit tests up to date
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@158 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-15 11:25:35 +00:00
David Heinemeier Hansson
0bb824b715 Changed validate_* to validates_*_of, so validate_acceptance becomes validates_acceptance_of, and added :on as a configuration option instead of using _on_create/update
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@157 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-15 01:36:05 +00:00
David Heinemeier Hansson
95314be65b Added tree mixin and unit tests for all the mixins
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@156 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-15 00:46:26 +00:00
David Heinemeier Hansson
0a8f382b80 Wrapped multi-step operations in transactions
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@155 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-14 18:17:44 +00:00
David Heinemeier Hansson
647c5e0565 fixtures :models will now also attempt to include the model.rb file
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@154 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-14 18:02:11 +00:00
David Heinemeier Hansson
bc1aa7d9fd fixtures :models will now also attempt to include the model.rb file
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@153 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-14 18:01:28 +00:00
David Heinemeier Hansson
68d1056587 Fixed that has_and_belongs_to_many would generate bad sql when naming conventions differed from using vanilla "id" everywhere [RedTerror]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@152 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-14 13:55:17 +00:00
David Heinemeier Hansson
c80f974fa3 Added FormHelper#radio_button to work with radio buttons like its already possible with check boxes [Michael Koziarski]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@151 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-14 13:48:27 +00:00
David Heinemeier Hansson
e5a8d8ebbb This patch allows urls to be of the form :module/:controller/:action as well as :controller/:action/:id where :id is no entirely numeric by determining if what would be :module corresponds to a directory in app/controllers. If it does not then the :controller/:action/:id scheme is used.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@150 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-14 12:58:25 +00:00
David Heinemeier Hansson
605bc77533 Added a better exception for when a type column is used in a table without the intention of triggering single-table inheritance. Added that single-table inheritance will only kick in if the inheritance_column (by default "type") is present. Otherwise, inheritance wont have any magic side effects
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@149 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-14 12:32:29 +00:00
David Heinemeier Hansson
317f13c2a8 Cut dependency on dev-utils by using included breakpoint lib
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@148 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-13 23:47:27 +00:00
David Heinemeier Hansson
0dfe122bb4 Slightly less overzealous testing
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@147 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-13 23:47:01 +00:00
David Heinemeier Hansson
458c5485a1 Improved the quality of the breakpointing -- especially under FCGI
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@146 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-13 23:38:08 +00:00
David Heinemeier Hansson
aaf6956c47 Added TemplateError#backtrace that makes it much easier to debug template errors from unit and functional tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@145 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-13 23:28:10 +00:00
David Heinemeier Hansson
2c5a2e7f2e Extended no inclusion of messages if theyre nil to base
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@144 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-13 19:25:33 +00:00
David Heinemeier Hansson
9b45e09b2a Fixed bug with reloading associations
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@143 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-13 19:14:53 +00:00
David Heinemeier Hansson
922f817a5a Added the option of passing false to :module or :controller_prefix in order to "break out" of a module or prefix
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@142 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-13 11:35:48 +00:00
David Heinemeier Hansson
0cce17f811 Updated unit tests to reflect lowercase post as method in form tags
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@141 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-13 11:08:21 +00:00