mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Insert a deprecation warn notice when using AS::DeprecatedCallbacks.
We are still using DeprecatedCallbacks in AS and AR. This is meant to annoy the shit out of Rails core until we fix it.
This commit is contained in:
parent
21e7b84621
commit
eff61fcfa8
1 changed files with 2 additions and 0 deletions
|
@ -205,6 +205,8 @@ module ActiveSupport
|
|||
|
||||
module ClassMethods
|
||||
def define_callbacks(*callbacks)
|
||||
ActiveSupport::Deprecation.warn('ActiveSupport::DeprecatedCallbacks has been deprecated in favor of ActiveSupport::Callbacks', caller)
|
||||
|
||||
callbacks.each do |callback|
|
||||
class_eval <<-"end_eval", __FILE__, __LINE__ + 1
|
||||
def self.#{callback}(*methods, &block) # def self.before_save(*methods, &block)
|
||||
|
|
Loading…
Reference in a new issue