|
Revision 449, 1.3 kB
(checked in by david, 4 years ago)
|
Added Inflector.humanize to turn attribute names like employee_salary into "Employee salary". Used by automated error reporting in AR.
|
| Line | |
|---|
| 1 |
* Added Inflector.humanize to turn attribute names like employee_salary into "Employee salary". Used by automated error reporting in AR. |
|---|
| 2 |
|
|---|
| 3 |
* Added availability of class inheritable attributes to the masses #477 [bitsweat] |
|---|
| 4 |
|
|---|
| 5 |
class Foo |
|---|
| 6 |
class_inheritable_reader :read_me |
|---|
| 7 |
class_inheritable_writer :write_me |
|---|
| 8 |
class_inheritable_accessor :read_and_write_me |
|---|
| 9 |
class_inheritable_array :read_and_concat_me |
|---|
| 10 |
class_inheritable_hash :read_and_update_me |
|---|
| 11 |
end |
|---|
| 12 |
|
|---|
| 13 |
# Bar gets a clone of (not a reference to) Foo's attributes. |
|---|
| 14 |
class Bar < Foo |
|---|
| 15 |
end |
|---|
| 16 |
|
|---|
| 17 |
Bar.read_and_write_me == Foo.read_and_write_me |
|---|
| 18 |
Bar.read_and_write_me = 'bar' |
|---|
| 19 |
Bar.read_and_write_me != Foo.read_and_write_me |
|---|
| 20 |
|
|---|
| 21 |
* Added Inflections as an extension on String, so Inflector.pluralize(Inflector.classify(name)) becomes name.classify.pluralize #476 [bitsweat] |
|---|
| 22 |
|
|---|
| 23 |
* Added Byte operations to Numeric, so 5.5.megabytes + 200.kilobytes #461 [Marcel Molina] |
|---|
| 24 |
|
|---|
| 25 |
* Fixed that Dependencies.reload can't load the same file twice #420 [Kent Sibilev] |
|---|
| 26 |
|
|---|
| 27 |
* Added Fixnum#ago/until, Fixnum#since/from_now #450 [bitsweat] |
|---|
| 28 |
|
|---|
| 29 |
* Added that Inflector now accepts Symbols and Classes by calling .to_s on the word supplied |
|---|
| 30 |
|
|---|
| 31 |
* Added time unit extensions to Fixnum that'll return the period in seconds, like 2.days + 4.hours. |
|---|