aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/module/delegation.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix the line number in the backtrace when Module#delegate raisesJon Leighton2011-08-151-1/+1
|
* Just do the method call directly in Module#delegate, if we can (we cannot ↵Jon Leighton2011-08-151-1/+4
| | | | for method names ending in '='). Two reasons: 1) it's faster, see https://gist.github.com/1089783 and 2) more importantly, delegate should not allow you to accidentally call private or protected methods.
* Refactored to more closely resemble idiom applied for on_nilEvan Light2011-08-051-5/+11
|
* Remove unnecessary require (happened after fcbde454f6)Dmitriy Kiriyenko2011-08-011-2/+0
|
* Don't do remove_possible_method when delegate is used. Two reasons: 1) ↵Jon Leighton2011-07-181-4/+0
| | | | warnings should be shown, and fixed at the source and 2) the code is slow. Fixes #1937.
* Simplify boolean logic into ternary.Ben Orenstein2011-06-081-1/+1
|
* delegate method should treat :prefix => false same as :prefix => nilNeeraj Singh2010-09-011-1/+1
| | | | | | [#5375 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* fisting stack trace [#4349 state:resolved]Aaron Patterson2010-04-081-1/+1
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Merge branch 'master' into docrailswycats2010-03-261-1/+7
|\
| * Singleton classes returns parent's methods with instance_methods(false) and ↵José Valim2010-03-191-1/+3
| | | | | | | | this makes remove_method in Module#delegate fail. Add a test case and fix the bug.
| * Eliminate warnings for AM on 1.8wycats2010-03-161-1/+5
| |
* | reformats an example in the rdoc of delegateXavier Noria2010-02-061-2/+7
| |
* | removes that beloved typo you only catch in github colored diffXavier Noria2010-01-211-1/+1
| |
* | rewords rdoc about :allow_nil in Module#delegateXavier Noria2010-01-211-4/+4
| |
* | a hash has no final keyXavier Noria2010-01-211-2/+2
|/
* Allow delegating to nil, because the method might actually exist on itBryan Helmkamp2009-08-101-4/+9
|
* Friendlier runtime exception if delegatee is nilJeremy Kemper2009-06-181-3/+9
|
* Delegated methods report the expected file/line in backtracesJeremy Kemper2009-06-181-2/+3
|
* Refactor ActionView::TemplateYehuda Katz + Carl Lerche2009-04-271-1/+3
| | | | | | | | ActionView::Template is now completely independent from template storage, which allows different back ends such as the database. ActionView::Template's only responsibility is to take in the template source (passed in from ActionView::Path), compile it, and render it.
* Inline code comments for class_eval/module_eval [#1657 state:resolved]Xavier Noria2008-12-281-3/+3
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Add :allow_nil option to delegate [#1127 state:resolved]Sergio Gil2008-12-211-1/+27
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Ensure only delegations to methods can have an automatic prefix. [#1235 ↵Daniel Schierbeck2008-11-211-0/+4
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Simplified the implementation of the :prefix option.Daniel Schierbeck2008-10-191-1/+1
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#984 state:committed]
* Added documentation of the new :prefix option.Daniel Schierbeck2008-10-191-0/+25
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Made the :prefix option on Module#delegate accept a custom prefix.Daniel Schierbeck2008-10-191-1/+1
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Added :prefix option to Module#delegate.Daniel Schierbeck2008-10-191-1/+3
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Improve documentation coverage and markupXavier Noria2008-05-021-3/+5
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Document that the delegate method can delegate to things other than just ↵Marcel Molina2007-12-051-0/+20
| | | | | | methods. Closes #7184 [dcmanges, jeremymcanally] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8311 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* tiny doc patches [lifo]Rick Olson2007-07-251-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7236 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Trim typo.Jeremy Kemper2006-05-081-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4330 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Document Active Support's Module::delegate. Closes #5002.Jeremy Kemper2006-05-081-2/+27
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4329 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added delegation support to Module that allows multiple delegations at once ↵David Heinemeier Hansson2006-02-041-0/+16
(unlike Forwardable in the stdlib) [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3535 5ecf4fe2-1ee6-0310-87b1-e25e094e27de