Permalink
Browse files

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

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

0 comments on commit d108672

Please sign in to comment.