David Heinemeier Hansson
e72ff355c3
Fixed that Module#alias_method_chain should work with both foo? foo! and foo at the same time ( closes #4954 ) [anna@wota.jp]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4429 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 22:43:13 +00:00
Jeremy Kemper
48052d70ec
to_xml fixes, features, and speedup. Closes #4989 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4413 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-03 00:01:08 +00:00
Sam Stephenson
c377ce50ed
Add OrderedHash#values
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4411 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-02 17:28:15 +00:00
David Heinemeier Hansson
408fe5facc
Added Array#to_s(:db) that'll produce a comma-separated list of ids [DHH] Split Grouping into its own file
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4387 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-31 23:25:36 +00:00
Jeremy Kemper
d31830cf9c
fix test warnings
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4386 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-31 22:43:53 +00:00
Marcel Molina
f91096a543
Normalize classify's argument to a String so that it plays nice with Symbols. [Marcel Molina Jr.]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4359 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-22 15:17:45 +00:00
Nicholas Seckar
04fb7c30e3
Remove Enumerable#first_match in favor of using break(result_for_each)
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4349 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-21 01:42:36 +00:00
Marcel Molina
36d1a2f302
Make Array#in_groups_of just return the grouped collection if a block isn't given. [Marcel Molina Jr.]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4345 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-17 05:12:53 +00:00
Marcel Molina
f2b3deb85c
Don't destroy a HashWithIndifferentAccess if symbolize_keys! or stringify_keys! is called on it. Closes #5076 . [Marcel Molina Jr., guy.naor@famundo.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4339 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-05-14 18:17:30 +00:00
Marcel Molina
995167ec2e
Strip out punctuation on predicates or bang methods being aliased with alias_method_chain since target?_without_feature is not a valid method name. Add tests for Module#alias_method_chain. [Marcel Molina Jr.]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4311 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-29 20:13:27 +00:00
Marcel Molina
71ff705449
Allow default options in with_options to be overridden. Closes #4480 . [murphy@cYcnus.de]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4282 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-26 21:49:41 +00:00
Sam Stephenson
c71607e29c
Add Array#split for dividing arrays into one or more subarrays by value or block
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4208 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-13 05:12:43 +00:00
Nicholas Seckar
f4382af543
fsking svn...
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4160 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-04 19:41:38 +00:00
Nicholas Seckar
ccadfc3695
Add forgotten testcase
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4159 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-04 19:40:34 +00:00
Nicholas Seckar
e714b25723
Update the diagnostics template skip the useless '<controller not set>' text.
...
Fix symbol extensions test case.
Clean paths inside of exception messages and traces.
Add Pathname.clean_within for cleaning all the paths inside of a string.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4158 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-04 19:37:29 +00:00
Nicholas Seckar
9efca53908
Dependencies cleanup. Fixes #4221 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4060 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-27 05:13:46 +00:00
Nicholas Seckar
24403498ba
Add CachingTools::HashCaching to simplify the creation of nested, autofilling hashes.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4059 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-27 03:59:35 +00:00
Nicholas Seckar
3bab575316
Update Object.subclasses_of to locate nested classes. Update Object.remove_subclasses_of to use Class.remove_class.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4049 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-26 20:00:40 +00:00
David Heinemeier Hansson
4e7c6f58fb
Added option to String#camelize to generate lower-cased camel case by passing in :lower, like "super_man".camelize(:lower) # => "superMan" [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3986 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-20 03:32:28 +00:00
Rick Olson
891a962a19
Added nicer message for assert_redirected_to ( closes #4294 ) [court3nay, Chris McGrath]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3969 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-19 03:50:14 +00:00
David Heinemeier Hansson
504ab568f8
Fixed HashWithIndifferentAccess#delete to work with both symbols and strings ( closes #2176 ) [Caio Chassot]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3912 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-18 04:01:44 +00:00
David Heinemeier Hansson
c3c69d9062
Added Time#advance to do precise time time calculations for cases where a month being approximated to 30 days won't do ( closes #1860 ) [Rick Olson]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3887 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-16 03:04:00 +00:00
Michael Koziarski
bf39c39d88
Time#xmlschema is only available when you've required 'time'. Add a unit test to catch regressions. [Koz]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3880 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-15 23:15:29 +00:00
Jamis Buck
6c95e9b146
Enhance Inflector.underscore to convert '-' into '_' (as the inverse of Inflector.dasherize)
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3877 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-15 21:05:10 +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
Tobias Lütke
8b4729a0eb
reverted #to_sentence to use red, green, and blue style
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3816 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-08 16:13:13 +00:00
David Heinemeier Hansson
cd989472a5
Added Hash#to_xml and Array#to_xml that makes it much easier to produce XML from basic structures [DHH] Moved Jim Weirich's wonderful Builder from Action Pack to Active Support (it's simply too useful to be stuck in AP) [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3812 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-08 02:56:25 +00:00
Tobias Lütke
0332d882b6
forgot to commit the fixed test case! (yea right)
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3803 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-06 22:51:24 +00:00
David Heinemeier Hansson
2e67f1adc8
RJS now does enumerations, baby! ( closes #3876 ) [Rick Olson]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3754 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-03 19:34:23 +00:00
David Heinemeier Hansson
4c5db2c7ea
Fixed that Array#to_sentence will return "" on an empty array instead of ", and" ( closes #3842 , #4031 ) [rubyonrails@beautifulpixel.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3739 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-02 01:51:52 +00:00
Marcel Molina
1fdf578c17
Add Enumerable#group_by and Array#in_groups_of
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3726 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-01 20:32:10 +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
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
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
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
Tobias Lütke
6fa5b7b304
added some (pointless) test cases to dependency loading, the more the merrier
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3537 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-04 21:24:40 +00:00
David Heinemeier Hansson
2ee6229bd8
Added delegation support to Module that allows multiple delegations at once (unlike Forwardable in the stdlib) [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3535 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-04 19:14:53 +00:00
David Heinemeier Hansson
ed080863d5
Just go with Subclasses instead of OnlySubclasses
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3533 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-04 06:11:42 +00:00
Nicholas Seckar
1aaeb2113b
Fix Reloadable to handle the case where a class that has been 'removed' has not yet been garbage collected.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3528 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-04 04:50:53 +00:00
Nicholas Seckar
ad9cabd77c
Remove LoadingModule
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3526 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-03 20:29:39 +00:00
Nicholas Seckar
1bce58b312
Add Reloadable::OnlySubclasses which handles the common case where a base class should not be reloaded, but its subclasses should be.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3521 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-02 05:41:00 +00:00
Nicholas Seckar
7a43a05a2b
Further improvements to reloading code
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3519 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-02 04:54:07 +00:00
David Heinemeier Hansson
01b1a87729
Added reusable reloading support through the inclusion of the Relodable module that all subclasses of ActiveRecord::Base, ActiveRecord::Observer, ActiveController::Base, and ActionMailer::Base automatically gets [DHH]. Added auto-loading support for classes in modules, so Conductor::Migration will look for conductor/migration.rb and Conductor::Database::Settings will look for conductor/database/settings.rb [Nicholas Seckar]. Refactored extensions to module, class, and object in active support [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3493 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-29 00:37:39 +00:00
Sam Stephenson
d921b79974
Add Object#instance_exec and Proc#bind
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3469 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-23 06:40:43 +00:00
David Heinemeier Hansson
9c24899ab0
Fix merge and dup for hashes with indifferent access ( closes #3404 ) [kenneth.miller@bitfield.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3468 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-23 05:38:02 +00:00
Sam Stephenson
039a90f535
Fix the requires in option_merger_test to unbreak AS tests
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3458 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-21 23:52:40 +00:00
Marcel Molina
36fc181a57
Make HashWithIndifferentAccess#update behave like Hash#update by returning the hash. Closes #3419 , #3425
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3388 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-08 21:29:47 +00:00
Sam Stephenson
e567a5eb1a
Add ActiveSupport::JSON and Object#to_json for converting Ruby objects to JSON strings
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3356 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-27 03:11:03 +00:00
Sam Stephenson
85fe1ecaef
Add Object#with_options for DRYing up multiple calls to methods having shared options
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3314 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-12-15 20:03:23 +00:00