Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Delegation works with reserved words passed to `:to` | Agis- | 2014-09-19 | 1 | -1/+9 | |
| | | | | Fixes #16956. | |||||
* | Fix confusing exception in ActiveSupport delegation | Vladimir Yarotsky | 2014-05-20 | 1 | -25/+13 | |
| | ||||||
* | Merge branch 'master' of github.com:rails/docrails | Vijay Dev | 2014-02-09 | 1 | -1/+2 | |
|\ | | | | | | | | | | | | | Conflicts: guides/source/active_record_validations.md guides/source/api_documentation_guidelines.md guides/source/configuring.md | |||||
| * | Fix grammar of internal comment and modify it's location | Zachary Scott | 2014-02-09 | 1 | -1/+2 | |
| | | ||||||
* | | fix typo and indent. [ci skip] | Yves Senn | 2014-01-30 | 1 | -1/+1 | |
| | | ||||||
* | | define the delegate methods on one line. fixes #13724 | Aaron Patterson | 2014-01-16 | 1 | -20/+22 | |
| | | | | | | | | sup haters | |||||
* | | Revert "methods are defined right after the module_eval, so we don't need to do" | Piotr Sarnacki | 2014-01-16 | 1 | -2/+2 | |
| | | | | | | | | | | | | | | | | | | This change breaks tests in activesupport/test/core_ext/module_test.rb: * test_delegation_exception_backtrace * test_delegation_exception_backtrace_with_allow_nil This reverts commit 0167765e3f84260522bc2f32d926c1f5dd44957c. | |||||
* | | methods are defined right after the module_eval, so we don't need to do | Aaron Patterson | 2014-01-15 | 1 | -2/+2 | |
|/ | | | | any line number maths | |||||
* | concern doesn't include the module automatically | Rafael Mendonça França | 2013-12-17 | 1 | -1/+0 | |
| | | | | [ci skip] | |||||
* | Introduce Module#concerning | Jeremy Kemper | 2013-12-17 | 1 | -0/+136 | |
| | | | | | | A natural, low-ceremony way to separate responsibilities within a class. Imported from https://github.com/37signals/concerning#readme | |||||
* | Spelling and Grammar check [ci skip] | Akshay Vishnoi | 2013-12-16 | 1 | -2/+2 | |
| | ||||||
* | Unify cattr and mattr accessors declarations | Genadi Samokovarov | 2013-12-02 | 1 | -14/+160 | |
| | ||||||
* | Improve Module#delegate documentation to tell that delegate don't work with ↵ | Lauro Caetano | 2013-11-29 | 1 | -0/+2 | |
| | | | | private or protected methods. [ci skip] | |||||
* | Clean up `require ‘active_support/deprecation’` and remove circular require | Dmitry Vorotilin | 2013-11-14 | 1 | -2/+0 | |
| | ||||||
* | Rely on NoMethodError#name when deciding to raise DelegationError. | Federico Ravasio | 2013-08-12 | 1 | -2/+1 | |
| | | | | | | | | | | Different Ruby implementations present backtraces differently, as it should be an information consumed by humans. A better implementation should use data from the error, in this case returned by NoMethodError#name. Fixes issues with Rubinius, which presents backtraces differently from MRI. | |||||
* | Merge branch 'master' of github.com:rails/docrails | Vijay Dev | 2013-07-21 | 1 | -0/+5 | |
|\ | ||||||
| * | Enhancing readability of options for delegate method | Thiago Pinto | 2013-07-16 | 1 | -0/+5 | |
| | | ||||||
* | | Only raise DelegationError if it's is the source of the exception | Andrew White | 2013-07-11 | 1 | -10/+11 | |
|/ | | | | | | | | | This fixes situations where nested NoMethodError exceptions are masked by delegations. This would cause confusion especially where there was a problem in the Rails booting process because of a delegation in the routes reloading code. Fixes #10559 | |||||
* | method transplanting between modules isn't supported on 1.9 | Aaron Patterson | 2013-07-03 | 1 | -0/+11 | |
| | ||||||
* | Remove deprecated `Module#local_constant_names` | Arun Agrawal | 2013-07-03 | 1 | -16/+0 | |
| | | | in favor of `Module#local_constants` | |||||
* | 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. | |||||
* | The third argument of deprecation_warning is always optional | Rafael Mendonça França | 2013-04-16 | 1 | -1/+1 | |
| | | | [ci skip] | |||||
* | Fix documentation to the custom Deprecator | Rafael Mendonça França | 2013-04-16 | 1 | -1/+1 | |
| | | | [ci skip] | |||||
* | Make caller attribute in deprecation methods optional | Alexey Gaziev | 2012-10-30 | 1 | -1/+1 | |
| | ||||||
* | Hash Syntax changes to 1.9 format | AvnerCohen | 2012-10-20 | 1 | -4/+4 | |
| | ||||||
* | Merge branch 'master' of github.com:lifo/docrails | Vijay Dev | 2012-09-21 | 3 | -4/+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 AS/core_ext docs [ci skip] | Francesco Rodriguez | 2012-09-12 | 2 | -3/+0 | |
| | | ||||||
| * | update some AS code examples to 1.9 hash syntax [ci skip] | Francesco Rodriguez | 2012-09-12 | 2 | -12/+11 | |
| | | ||||||
* | | 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] | |||||
* | | Merge pull request #7613 from marcandre/delegate_to_class | Jeremy Kemper | 2012-09-20 | 1 | -0/+3 | |
|\ \ | | | | | | | Nice and easy delegation to the class | |||||
| * | | Nice and easy delegation to the class | Marc-Andre Lafortune | 2012-09-11 | 1 | -0/+3 | |
| |/ | ||||||
* | | Copy-edit deprecation relared documentation [ci skip] | Rafael Mendonça França | 2012-09-13 | 1 | -28/+10 | |
| | | ||||||
* | | Change ActiveSupport::Deprecation to class. | Piotr Niełacny | 2012-09-13 | 1 | -1/+33 | |
|/ | | | | | | | | | | | | | | | | | | | | | | | | ActiveSupport::Deprecation is now a class rather than a module. You can get instance of ActiveSupport::Deprecation calling #instance method. ActiveSupport::Deprecation.instance But when you need to get new object od ActiveSupport::Deprecation you need to just call #new. @instance = ActiveSupport::Deprecation.new Since you can create a new object, you can change the version and the name of the library where the deprecator concerned. ActiveSupport::Deprecation.new('2.0', 'MyGem') If you need use another deprecator instance you can select it in the options of deprecate method. deprecate :method, :deprecator => deprecator_instance Documentation has been updated. | |||||
* | no need to to_s here. Both String and Symbol can be interpolated into String | Akira Matsuda | 2012-06-06 | 1 | -3/+0 | |
| | ||||||
* | fix example format and add markup in Module#mattr_accessor documentation [ci ↵ | Francesco Rodriguez | 2012-05-29 | 1 | -10/+10 | |
| | | | | skip] | |||||
* | update Module#mattr_accessor documentation [ci skip] | Francesco Rodriguez | 2012-05-26 | 1 | -6/+6 | |
| | ||||||
* | removing unnecessary 'examples' noise from activesupport | Francesco Rodriguez | 2012-05-13 | 1 | -2/+0 | |
| | ||||||
* | String quotes and trailing spaces | Alexey Gaziev | 2012-04-29 | 3 | -11/+11 | |
| | ||||||
* | AS core_ext refactoring pt.2 | Alexey Gaziev | 2012-04-29 | 5 | -13/+14 | |
| | ||||||
* | 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. |