aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/module
Commit message (Collapse)AuthorAgeFilesLines
...
* Some documentation edits [ci skip]Robin Dupret2015-03-051-3/+3
| | | | | | * Fix a few typos * Wrap some lines around 80 chars * Rephrase some statements
* Merge pull request #19131 from ↵Yves Senn2015-02-281-1/+1
|\ | | | | | | | | tgxworld/reduce_allocated_memory_in_module_delegate Reduce allocated memory for Module#delegate.
| * Reduce allocated memory for Module#delegate.Guo Xiang Tan2015-03-011-1/+1
| |
* | [ci skip] Add code examples for Module#anonymous? documentationAnton Davydov2015-02-281-0/+7
|/
* Revert 88d08f2ec9f89ba431cba8d0c06ac9ebc204bbbbRafael Mendonça França2015-02-111-12/+24
| | | | | | | This caused a performance regression since we were decided to do the nil check in run time not in the load time. See https://github.com/rails/rails/pull/15187#issuecomment-71760058
* adding documentation for 'remove_possible_method' and 'redefine_method' [ci ↵George Millo2015-01-051-0/+3
| | | | skip]
* Remove extra class_eval for Ruby 1.9Carlos Antonio da Silva2015-01-041-5/+2
|
* remove files which is dependent on ruby1.9 as we do not support Ruby1.9Kuldeep Aggarwal2015-01-041-11/+3
| | | | | Conflicts: activerecord/lib/active_record/attribute_methods/read.rb
* Replace `#=>` with `# =>` [ci skip]claudiob2014-12-171-1/+1
| | | | | | | | @rafaelfranca suggested in f7c7bcd9 that code examples should display the result after `# =>` and not after `#=>`. This commit replaces *all* the occurrences of `#=>` in the code documentation (mostly added by me :sob:) with the suggested `# =>`.
* English fix [ci skip]George Millo2014-12-121-1/+1
|
* doc added for `writer` method in `alias_method_chain`[ci skip]Kuldeep Aggarwal2014-10-041-2/+2
|
* Delegation works with reserved words passed to `:to`Agis-2014-09-191-1/+9
| | | | Fixes #16956.
* Fix confusing exception in ActiveSupport delegationVladimir Yarotsky2014-05-201-25/+13
|
* Merge branch 'master' of github.com:rails/docrailsVijay Dev2014-02-091-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 locationZachary Scott2014-02-091-1/+2
| |
* | fix typo and indent. [ci skip]Yves Senn2014-01-301-1/+1
| |
* | define the delegate methods on one line. fixes #13724Aaron Patterson2014-01-161-20/+22
| | | | | | | | sup haters
* | Revert "methods are defined right after the module_eval, so we don't need to do"Piotr Sarnacki2014-01-161-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 doAaron Patterson2014-01-151-2/+2
|/ | | | any line number maths
* concern doesn't include the module automaticallyRafael Mendonça França2013-12-171-1/+0
| | | | [ci skip]
* Introduce Module#concerningJeremy Kemper2013-12-171-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 Vishnoi2013-12-161-2/+2
|
* Unify cattr and mattr accessors declarationsGenadi Samokovarov2013-12-021-14/+160
|
* Improve Module#delegate documentation to tell that delegate don't work with ↵Lauro Caetano2013-11-291-0/+2
| | | | private or protected methods. [ci skip]
* Clean up `require ‘active_support/deprecation’` and remove circular requireDmitry Vorotilin2013-11-141-2/+0
|
* Rely on NoMethodError#name when deciding to raise DelegationError.Federico Ravasio2013-08-121-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/docrailsVijay Dev2013-07-211-0/+5
|\
| * Enhancing readability of options for delegate methodThiago Pinto2013-07-161-0/+5
| |
* | Only raise DelegationError if it's is the source of the exceptionAndrew White2013-07-111-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.9Aaron Patterson2013-07-031-0/+11
|
* Remove deprecated `Module#local_constant_names` Arun Agrawal2013-07-031-16/+0
| | | in favor of `Module#local_constants`
* Move delegation error constant to inside ModuleCarlos Antonio da Silva2013-06-261-2/+4
|
* Merge pull request #10828 from southpolesteve/delegation_error_classYves Senn2013-06-261-1/+3
|\ | | | | Create DelegationError class
| * Add DelegationError class. Rasied by delegation to a nil objectSteve Faulkner2013-06-261-1/+3
| |
* | Fix some typosVipul A M2013-06-071-1/+1
|/
* Use new hash syntax in module delegation docs [ci skip]Carlos Antonio da Silva2013-04-281-1/+1
|
* Module#delegate checks nilness rather that falsehood if :allow_nil is true, ↵Xavier Noria2013-04-261-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 bugLi Ellis Gallardo2013-04-251-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 optionalRafael Mendonça França2013-04-161-1/+1
| | | [ci skip]
* Fix documentation to the custom DeprecatorRafael Mendonça França2013-04-161-1/+1
| | | [ci skip]
* Make caller attribute in deprecation methods optionalAlexey Gaziev2012-10-301-1/+1
|
* Hash Syntax changes to 1.9 formatAvnerCohen2012-10-201-4/+4
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-09-213-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 Rodriguez2012-09-122-3/+0
| |
| * update some AS code examples to 1.9 hash syntax [ci skip]Francesco Rodriguez2012-09-122-12/+11
| |
* | Update delegate docs with new hash syntax [ci skip]Carlos Antonio da Silva2012-09-201-10/+10
| |
* | Add changelog entry and docs about class delegation using the symbol :classCarlos Antonio da Silva2012-09-201-0/+12
| | | | | | | | See #7613. [ci skip]
* | Merge pull request #7613 from marcandre/delegate_to_classJeremy Kemper2012-09-201-0/+3
|\ \ | | | | | | Nice and easy delegation to the class
| * | Nice and easy delegation to the classMarc-Andre Lafortune2012-09-111-0/+3
| |/
* | Copy-edit deprecation relared documentation [ci skip]Rafael Mendonça França2012-09-131-28/+10
| |