Cleanup deprecation notices.
This commit is contained in:
parent
e27bfad6a5
commit
68b76a38eb
@ -15,7 +15,7 @@ def after_dispatch(*args, &block)
|
||||
|
||||
def to_prepare(*args, &block)
|
||||
ActiveSupport::Deprecation.warn "ActionController::Dispatcher.to_prepare is deprecated. " <<
|
||||
"Please use ActionDispatch::Callbacks.to_prepare instead.", caller
|
||||
"Please use config.to_prepare instead", caller
|
||||
ActionDispatch::Callbacks.after(*args, &block)
|
||||
end
|
||||
|
||||
|
@ -9,7 +9,7 @@ module NamedScope
|
||||
module ClassMethods
|
||||
# Returns a relation if invoked without any arguments.
|
||||
#
|
||||
# posts = Post.scoped
|
||||
# posts = Post.scoped
|
||||
# posts.size # Fires "select count(*) from posts" and returns the count
|
||||
# posts.each {|p| puts p.name } # Fires "select * from posts" and loads post objects
|
||||
#
|
||||
@ -41,8 +41,8 @@ def scopes
|
||||
# scope :red, :conditions => {:color => 'red'}
|
||||
# scope :dry_clean_only, :joins => :washing_instructions, :conditions => ['washing_instructions.dry_clean_only = ?', true]
|
||||
# end
|
||||
#
|
||||
# The above calls to <tt>scope</tt> define class methods Shirt.red and Shirt.dry_clean_only. Shirt.red,
|
||||
#
|
||||
# The above calls to <tt>scope</tt> define class methods Shirt.red and Shirt.dry_clean_only. Shirt.red,
|
||||
# in effect, represents the query <tt>Shirt.find(:all, :conditions => {:color => 'red'})</tt>.
|
||||
#
|
||||
# Unlike <tt>Shirt.find(...)</tt>, however, the object returned by Shirt.red is not an Array; it resembles the association object
|
||||
@ -120,7 +120,7 @@ def scope(name, options = {}, &block)
|
||||
end
|
||||
|
||||
def named_scope(*args, &block)
|
||||
ActiveSupport::Deprecation.warn("Base.named_scope has been deprecated, please use Base.scope instead.", caller)
|
||||
ActiveSupport::Deprecation.warn("Base.named_scope has been deprecated, please use Base.scope instead", caller)
|
||||
scope(*args, &block)
|
||||
end
|
||||
end
|
||||
|
@ -11,7 +11,7 @@ def replace(*args)
|
||||
end
|
||||
|
||||
def warn(callstack, called, args)
|
||||
msg = "RAILS_ROOT is deprecated! Use Rails.root instead."
|
||||
msg = "RAILS_ROOT is deprecated! Use Rails.root instead"
|
||||
ActiveSupport::Deprecation.warn(msg, callstack)
|
||||
end
|
||||
end).new
|
||||
@ -26,7 +26,7 @@ def replace(*args)
|
||||
end
|
||||
|
||||
def warn(callstack, called, args)
|
||||
msg = "RAILS_ENV is deprecated! Use Rails.env instead."
|
||||
msg = "RAILS_ENV is deprecated! Use Rails.env instead"
|
||||
ActiveSupport::Deprecation.warn(msg, callstack)
|
||||
end
|
||||
end).new
|
||||
@ -41,7 +41,7 @@ def replace(*args)
|
||||
end
|
||||
|
||||
def warn(callstack, called, args)
|
||||
msg = "RAILS_DEFAULT_LOGGER is deprecated! Use Rails.logger instead."
|
||||
msg = "RAILS_DEFAULT_LOGGER is deprecated! Use Rails.logger instead"
|
||||
ActiveSupport::Deprecation.warn(msg, callstack)
|
||||
end
|
||||
end).new
|
||||
|
Loading…
Reference in New Issue
Block a user