diff options
author | yui-knk <spiketeika@gmail.com> | 2015-12-15 21:12:16 +0900 |
---|---|---|
committer | Yuichiro Kaneko <kaneko.yuichiro@moneyforward.co.jp> | 2015-12-16 19:56:20 +0900 |
commit | 21f4017fd904532ebe4964481567d69636a711cf (patch) | |
tree | b8e28d0a5b39f9db1b424df4d0821cf34aa70352 /activerecord/lib/active_record | |
parent | 2de7385cef62ad12cef5bcfe1de18c4662072344 (diff) | |
download | rails-21f4017fd904532ebe4964481567d69636a711cf.tar.gz rails-21f4017fd904532ebe4964481567d69636a711cf.tar.bz2 rails-21f4017fd904532ebe4964481567d69636a711cf.zip |
Deprecate passing string to define callback.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/callbacks.rb | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/activerecord/lib/active_record/callbacks.rb b/activerecord/lib/active_record/callbacks.rb index 4058affec3..854f9776a3 100644 --- a/activerecord/lib/active_record/callbacks.rb +++ b/activerecord/lib/active_record/callbacks.rb @@ -175,21 +175,6 @@ module ActiveRecord # end # end # - # The callback macros usually accept a symbol for the method they're supposed to run, but you can also - # pass a "method string", which will then be evaluated within the binding of the callback. Example: - # - # class Topic < ActiveRecord::Base - # before_destroy 'self.class.delete_all "parent_id = #{id}"' - # end - # - # Notice that single quotes (') are used so the <tt>#{id}</tt> part isn't evaluated until the callback - # is triggered. Also note that these inline callbacks can be stacked just like the regular ones: - # - # class Topic < ActiveRecord::Base - # before_destroy 'self.class.delete_all "parent_id = #{id}"', - # 'puts "Evaluated after parents are destroyed"' - # end - # # == <tt>before_validation*</tt> returning statements # # If the +before_validation+ callback throws +:abort+, the process will be |