David Heinemeier Hansson
3dcae9fefd
Fixed that pluralizing an empty string should return the same empty string, not "s" ( closes #7720 ) [josh]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7569 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-22 18:34:43 +00:00
David Heinemeier Hansson
46b0e7d1d7
Added support for pluralization with a different starting letter than the singular version (cow/kine) ( closes #4929 ) [norri_b/hasmanyjosh]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7092 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-23 16:47:47 +00:00
Jeremy Kemper
af2ebb29da
Inflections: MatrixTest -> MatrixTests instead of MatricesTest. Closes #8496 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6886 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-05-29 02:40:34 +00:00
Jeremy Kemper
b0ed5057e0
Full test coverage for Inflector. Closes #7228 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6075 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-28 15:52:45 +00:00
Rick Olson
be7f86e37a
Added test coverage for Inflector.inflections.clear. Closes #7179 . [Rich Collins]. Remove unused code from Duration#inspect. Closes #7180 . [Rich Collins]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6022 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-23 05:32:08 +00:00
Rick Olson
f3f691eaf2
A couple extra tests for #classify. Closes #7273 . [Josh Susser]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6019 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-23 05:11:34 +00:00
Jeremy Kemper
71234daef1
r4487@asus: jeremy | 2006-04-29 12:21:39 -0700
...
Check whether @flash is defined? for warnings-safety.
r4488@asus: jeremy | 2006-04-29 12:23:15 -0700
Check whether @flash is defined? for warnings-safety. Obviates nil? check.
r4489@asus: jeremy | 2006-04-29 12:45:18 -0700
Check whether @session is defined? for warnings-safety.
r4490@asus: jeremy | 2006-04-29 12:50:41 -0700
Check whether @rendering_runtime is defined? for warnings-safety.
r4491@asus: jeremy | 2006-04-29 12:55:01 -0700
Check whether @_cycles is defined? for warnings-safety.
r4492@asus: jeremy | 2006-04-29 12:59:19 -0700
Check whether instance variables are defined? for warnings-safety.
r4493@asus: jeremy | 2006-04-29 13:14:09 -0700
Add nil @template to PrototypeHelperTest to suppress unitialized instance variable warning.
r4494@asus: jeremy | 2006-04-29 13:31:34 -0700
Check whether @auto_index defined? for warnings-safety.
r4495@asus: jeremy | 2006-04-29 13:32:24 -0700
Wrap content_columns redefinitions with silence_warnings.
r4496@asus: jeremy | 2006-04-29 13:35:28 -0700
Wrap more redefinitions with silence_warnings.
r4829@asus: jeremy | 2006-07-08 10:59:20 -0700
abstract unit, fix warnings
r4830@asus: jeremy | 2006-07-08 11:06:12 -0700
Use parens to silence warning.
r4831@asus: jeremy | 2006-07-08 11:06:48 -0700
Use parens to silence warning.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4595 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-08 18:14:49 +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
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
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
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
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
Jeremy Kemper
a821c3dd93
r3215@asus: jeremy | 2005-11-20 02:05:56 -0800
...
Eliminate double-requires due to Ruby seeing different paths to the same file.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3127 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-21 07:29:04 +00:00
Nicholas Seckar
1cc8ab865f
Change Inflector#constantize to use eval instead of const_get
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3049 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-16 00:56:16 +00:00
Jeremy Kemper
8210f70c7c
Fix status pluralization bug so status_codes doesn't get pluralized as statuses_code. Closes #2758 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2900 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-07 01:20:54 +00:00
Marcel Molina
b23c72fd42
Add title case method to String to do, e.g., 'action_web_service'.titlecase # => 'Action Web Service'.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2690 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-19 20:20:11 +00:00
David Heinemeier Hansson
426fa08cc0
Fixed Inflector.underscore for use with acronyms, so HTML becomes html instead of htm_l #2173 [k@v2studio.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2227 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-13 07:44:20 +00:00
David Heinemeier Hansson
9105cd1064
Fixed inflections for status, quiz, move #2056 [deirdre@deirdre.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2214 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-12 05:29:47 +00:00
David Heinemeier Hansson
fb2dd492d6
Fixed inflections of "index/indices" #1766 [damn_pepe@gmail.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1881 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-22 06:52:10 +00:00
David Heinemeier Hansson
305a5463bd
Added stripping of _id to String#humanize, so "employee_id" becomes "Employee" #1574 [Justin French]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1854 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-17 10:18:36 +00:00
David Heinemeier Hansson
33cf8f162e
Added Fixnum#ordinalize to turn 1.ordinalize to "1st", 3.ordinalize to "3rd", and 10.ordinalize to "10th" and so on #1724 [paul@cnt.org]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1852 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-17 10:02:23 +00:00
David Heinemeier Hansson
f4c579e92e
More inflector fixes #1608
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1699 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-05 07:44:46 +00:00
David Heinemeier Hansson
f5db702901
More inflector fixes #1599 [foamdino@gmail.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1662 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-04 15:15:13 +00:00
David Heinemeier Hansson
da4b15fe18
More inflectoring #1490
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1616 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-02 19:05:47 +00:00
David Heinemeier Hansson
c196db9527
Fixed photo/photos #1583
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1615 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-02 18:59:01 +00:00
David Heinemeier Hansson
64612db7cf
Added new rules to the Inflector to deal with more unusual plurals mouse/louse => mice/lice, information => information, ox => oxen #1571 [foamdino@gmail.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1582 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-01 16:57:58 +00:00
David Heinemeier Hansson
71b6f76543
Fixed the Inflector to underscore strings containing numbers, so Area51Controller becomes area51_controller #1176 [Nicholas Seckar]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1330 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-19 19:15:30 +00:00
David Heinemeier Hansson
db2495cf7e
Fixed the pluralization of analysis to analyses #1295 [seattle@rootimage.msu.edu]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1314 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-19 17:10:20 +00:00
David Heinemeier Hansson
14860ebe82
Added commented out tests for staying either singular or plural on inflection
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1252 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-30 08:39:28 +00:00
David Heinemeier Hansson
38a0b5b427
Fixed inflection of perspectives and similar words #1045 [thijs@vandervossen.net]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1101 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-07 06:19:10 +00:00
David Heinemeier Hansson
abfa14d825
Fixed Inflector.pluralize to handle capitalized words #932 [bitsweat]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@998 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-03-26 13:20:47 +00:00
David Heinemeier Hansson
6cae2b7439
Added inflection rules for "sh" words, like "wish" and "fish" #755 [phillip@pjbsoftware.com]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@844 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-03-06 13:43:04 +00:00
David Heinemeier Hansson
dc3d6eb9b4
Moved Active Support into its own gem
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@624 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-15 15:57:44 +00:00
David Heinemeier Hansson
45caae41c3
Fixed all the tests
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@623 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-15 15:02:43 +00:00
David Heinemeier Hansson
603ab7d812
Fixed Inflector for words like "news" and "series" that are the same in plural and singular #603 [echion], #615 [marcenuc]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@618 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-15 02:02:20 +00:00
David Heinemeier Hansson
b1999be5a7
A hopefully more successful attempt at the Routing branch merge
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@617 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-15 01:45:35 +00:00
David Heinemeier Hansson
88a3343ed5
Backed out of routing merge.. investigating missing patches
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@616 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-15 01:24:55 +00:00
David Heinemeier Hansson
c844755e5a
Merged back the Routing branch
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@614 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-15 00:51:02 +00:00
David Heinemeier Hansson
1b38c5523e
Added Inflector.humanize to turn attribute names like employee_salary into "Employee salary". Used by automated error reporting in AR.
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@449 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-01-17 19:53:42 +00:00
David Heinemeier Hansson
f4b721904a
Added test cases and rakefile to Active Support
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@310 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-01-02 15:16:59 +00:00
David Heinemeier Hansson
bd323b3c99
Moved support from both Action Pack and Active Record into a separate module called Active Support that can be included using svn:externals in both
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@273 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-12-29 21:03:21 +00:00