aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2013-07-05 12:32:05 +0200
committerYves Senn <yves.senn@gmail.com>2013-07-05 12:41:15 +0200
commitd108672dada7ba97d3b3b56f0c6001cea621061e (patch)
treed1466bdc6ab237b116ea4c599d77156f918a4ba6
parentefeb03901f443186da4bd1d5748b27f3cf390d06 (diff)
downloadrails-d108672dada7ba97d3b3b56f0c6001cea621061e.tar.gz
rails-d108672dada7ba97d3b3b56f0c6001cea621061e.tar.bz2
rails-d108672dada7ba97d3b3b56f0c6001cea621061e.zip
remove string based terminators for `ActiveSupport::Callbacks`.
-rw-r--r--activesupport/CHANGELOG.md4
-rw-r--r--activesupport/lib/active_support/callbacks.rb6
2 files changed, 4 insertions, 6 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index 8c07a034cc..4ca82910cc 100644
--- a/activesupport/CHANGELOG.md
+++ b/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*
diff --git a/activesupport/lib/active_support/callbacks.rb b/activesupport/lib/active_support/callbacks.rb
index 5c738572a8..d2991a218b 100644
--- a/activesupport/lib/active_support/callbacks.rb
+++ b/activesupport/lib/active_support/callbacks.rb
@@ -718,12 +718,6 @@ module ActiveSupport
# 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"