Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Move delegation error constant to inside Module | Carlos Antonio da Silva | 2013-06-26 | 1 | -2/+4 |
| | |||||
* | Merge pull request #10828 from southpolesteve/delegation_error_class | Yves Senn | 2013-06-26 | 1 | -1/+3 |
|\ | | | | | Create DelegationError class | ||||
| * | Add DelegationError class. Rasied by delegation to a nil object | Steve Faulkner | 2013-06-26 | 1 | -1/+3 |
| | | |||||
* | | Fix some typos | Vipul A M | 2013-06-07 | 1 | -1/+1 |
|/ | |||||
* | Use new hash syntax in module delegation docs [ci skip] | Carlos Antonio da Silva | 2013-04-28 | 1 | -1/+1 |
| | |||||
* | Module#delegate checks nilness rather that falsehood if :allow_nil is true, ↵ | Xavier Noria | 2013-04-26 | 1 | -30/+42 |
| | | | | | | | | | | | | | | and avoids multiple evaluation of the target method Notes: 1) I hope nilness is a word. 2) See rationale for avoiding multiple evaluation in a comment in the patch, credit goes to @jeremy for pointing out this gotcha in the existing implementation. 3) Embeds a little joke dedicated to @pixeltrix (it could be worse! :D). References #10347. | ||||
* | Delegation method bug | Li Ellis Gallardo | 2013-04-25 | 1 | -0/+14 |
| | | | | | | Add documentation and test to delegation method that make sure we're aware that when a delegated object is not nil or false and doesn't respond to the method it will still raise a NoMethodError exception. | ||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-09-21 | 1 | -1/+0 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: actionmailer/lib/action_mailer/base.rb activesupport/lib/active_support/configurable.rb activesupport/lib/active_support/core_ext/module/deprecation.rb guides/source/action_controller_overview.md guides/source/active_support_core_extensions.md guides/source/ajax_on_rails.textile guides/source/association_basics.textile guides/source/upgrading_ruby_on_rails.md While resolving conflicts, I have chosen to ignore changes done in docrails at some places - these will be most likely 1.9 hash syntax changes. | ||||
| * | update some AS code examples to 1.9 hash syntax [ci skip] | Francesco Rodriguez | 2012-09-12 | 1 | -10/+9 |
| | | |||||
* | | Update delegate docs with new hash syntax [ci skip] | Carlos Antonio da Silva | 2012-09-20 | 1 | -10/+10 |
| | | |||||
* | | Add changelog entry and docs about class delegation using the symbol :class | Carlos Antonio da Silva | 2012-09-20 | 1 | -0/+12 |
| | | | | | | | | See #7613. [ci skip] | ||||
* | | Nice and easy delegation to the class | Marc-Andre Lafortune | 2012-09-11 | 1 | -0/+3 |
|/ | |||||
* | no need to to_s here. Both String and Symbol can be interpolated into String | Akira Matsuda | 2012-06-06 | 1 | -3/+0 |
| | |||||
* | String quotes and trailing spaces | Alexey Gaziev | 2012-04-29 | 1 | -8/+8 |
| | |||||
* | AS core_ext refactoring pt.2 | Alexey Gaziev | 2012-04-29 | 1 | -1/+1 |
| | |||||
* | Remove Module#delegate! | Daniel Schierbeck | 2012-04-12 | 1 | -52/+0 |
| | |||||
* | Add back the old `deprecate` method as `deprecate!` | Daniel Schierbeck | 2012-04-12 | 1 | -0/+52 |
| | |||||
* | Change API docs regarding delegation to non-public methods | Daniel Schierbeck | 2012-04-12 | 1 | -1/+1 |
| | |||||
* | Optimize the performance of #delegate | Daniel Schierbeck | 2012-04-12 | 1 | -9/+13 |
| | | | | | | Remove the use of #__send__ in order to boost performance. This also means that you can no longer delegate to private methods on the target object. | ||||
* | Remove deprecation from AS::Deprecation behavior, some minor cleanups | Carlos Antonio da Silva | 2012-03-16 | 1 | -7/+9 |
| | | | | | | | | | * Refactor log subscriber, use select! to avoid a new object * Remove deprecation messages related to AS::Deprecation behavior This was added about 2 years ago for Rails 3: https://github.com/rails/rails/commit/d4c7d3fd94e5a885a6366eaeb3b908bb58ffd4db * Remove some not used requires * Refactor delegate to avoid string conversions and if statements inside each block | ||||
* | Fix indentation in code example of Delegation | Tomasz Zurkowski | 2012-01-20 | 1 | -19/+19 |
| | |||||
* | Revert all the stuff to do with disallowing non-public methods for ↵ | Jon Leighton | 2011-08-25 | 1 | -6/+2 |
| | | | | Module#delegate | ||||
* | prefer ends_with? over slicing | Xavier Noria | 2011-08-16 | 1 | -1/+2 |
| | |||||
* | Add a test for delegating a method ending in '=' as this is a special case. | Jon Leighton | 2011-08-15 | 1 | -0/+1 |
| | |||||
* | Need to include public_send | Arun Agrawal | 2011-08-15 | 1 | -0/+1 |
| | |||||
* | Split up the definitions in Module#delegate depending on :allow_nil, and ↵ | Jon Leighton | 2011-08-15 | 1 | -17/+22 |
| | | | | don't use exceptions for flow control in the :allow_nil => true case. | ||||
* | Fix the line number in the backtrace when Module#delegate raises | Jon Leighton | 2011-08-15 | 1 | -1/+1 |
| | |||||
* | Just do the method call directly in Module#delegate, if we can (we cannot ↵ | Jon Leighton | 2011-08-15 | 1 | -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_nil | Evan Light | 2011-08-05 | 1 | -5/+11 |
| | |||||
* | Remove unnecessary require (happened after fcbde454f6) | Dmitriy Kiriyenko | 2011-08-01 | 1 | -2/+0 |
| | |||||
* | Don't do remove_possible_method when delegate is used. Two reasons: 1) ↵ | Jon Leighton | 2011-07-18 | 1 | -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 Orenstein | 2011-06-08 | 1 | -1/+1 |
| | |||||
* | delegate method should treat :prefix => false same as :prefix => nil | Neeraj Singh | 2010-09-01 | 1 | -1/+1 |
| | | | | | | [#5375 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | fisting stack trace [#4349 state:resolved] | Aaron Patterson | 2010-04-08 | 1 | -1/+1 |
| | | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Merge branch 'master' into docrails | wycats | 2010-03-26 | 1 | -1/+7 |
|\ | |||||
| * | Singleton classes returns parent's methods with instance_methods(false) and ↵ | José Valim | 2010-03-19 | 1 | -1/+3 |
| | | | | | | | | this makes remove_method in Module#delegate fail. Add a test case and fix the bug. | ||||
| * | Eliminate warnings for AM on 1.8 | wycats | 2010-03-16 | 1 | -1/+5 |
| | | |||||
* | | reformats an example in the rdoc of delegate | Xavier Noria | 2010-02-06 | 1 | -2/+7 |
| | | |||||
* | | removes that beloved typo you only catch in github colored diff | Xavier Noria | 2010-01-21 | 1 | -1/+1 |
| | | |||||
* | | rewords rdoc about :allow_nil in Module#delegate | Xavier Noria | 2010-01-21 | 1 | -4/+4 |
| | | |||||
* | | a hash has no final key | Xavier Noria | 2010-01-21 | 1 | -2/+2 |
|/ | |||||
* | Allow delegating to nil, because the method might actually exist on it | Bryan Helmkamp | 2009-08-10 | 1 | -4/+9 |
| | |||||
* | Friendlier runtime exception if delegatee is nil | Jeremy Kemper | 2009-06-18 | 1 | -3/+9 |
| | |||||
* | Delegated methods report the expected file/line in backtraces | Jeremy Kemper | 2009-06-18 | 1 | -2/+3 |
| | |||||
* | Refactor ActionView::Template | Yehuda Katz + Carl Lerche | 2009-04-27 | 1 | -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 Noria | 2008-12-28 | 1 | -3/+3 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Add :allow_nil option to delegate [#1127 state:resolved] | Sergio Gil | 2008-12-21 | 1 | -1/+27 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Ensure only delegations to methods can have an automatic prefix. [#1235 ↵ | Daniel Schierbeck | 2008-11-21 | 1 | -0/+4 |
| | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Simplified the implementation of the :prefix option. | Daniel Schierbeck | 2008-10-19 | 1 | -1/+1 |
| | | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#984 state:committed] | ||||
* | Added documentation of the new :prefix option. | Daniel Schierbeck | 2008-10-19 | 1 | -0/+25 |
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> |