Skip to content
This repository
Browse code

remove string based terminators for `ActiveSupport::Callbacks`.

  • Loading branch information...
commit d108672dada7ba97d3b3b56f0c6001cea621061e 1 parent efeb039
Yves Senn senny authored
4 activesupport/CHANGELOG.md
Source Rendered
... ... @@ -1,3 +1,7 @@
  1 +* Remove deprecated string based terminators for y`ActiveSupport::Callbacks`.
  2 +
  3 + *Yves Senn*
  4 +
1 5 * Remove deprecated `String#encoding_aware?` core extensions (`core_ext/string/encoding`).
2 6
3 7 *Arun Agrawal*
6 activesupport/lib/active_support/callbacks.rb
@@ -718,12 +718,6 @@ def reset_callbacks(name)
718 718 # would call <tt>Audit#save</tt>.
719 719 def define_callbacks(*names)
720 720 options = names.extract_options!
721   - if options.key?(:terminator) && String === options[:terminator]
722   - ActiveSupport::Deprecation.warn "String based terminators are deprecated, please use a lambda"
723   - value = options[:terminator]
724   - line = class_eval "lambda { |result| #{value} }", __FILE__, __LINE__
725   - options[:terminator] = lambda { |target, result| target.instance_exec(result, &line) }
726   - end
727 721
728 722 names.each do |name|
729 723 class_attribute "_#{name}_callbacks"

0 comments on commit d108672

Please sign in to comment.
Something went wrong with that request. Please try again.