Skip to content

Commit

Permalink
Deprecate ActionView::Base.erb_variable. Append the concat helper met…
Browse files Browse the repository at this point in the history
…hod instead of appending to it directly.
  • Loading branch information
jeremy committed Jun 8, 2008
1 parent b69de8c commit b30604a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*Edge*

* Deprecate ActionView::Base.erb_variable. Append the concat helper method instead of appending to it directly. [Jeremy Kemper]

* Fixed Request#remote_ip to only raise hell if the HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR doesn't match (not just if they're both present) [Mark Imbriaco, Bradford Folkens]

* Allow caches_action to accept a layout option [José Valim]
Expand Down
7 changes: 5 additions & 2 deletions actionpack/lib/action_view/base.rb
Expand Up @@ -178,10 +178,13 @@ def self.cache_template_extensions=(*args)
# that alert()s the caught exception (and then re-raises it).
@@debug_rjs = false
cattr_accessor :debug_rjs

@@erb_variable = '_erbout'
cattr_accessor :erb_variable

class << self
deprecate :erb_variable= => 'The erb variable will no longer be configurable. Use the concat helper method instead of appending to it directly.'
end

attr_internal :request

delegate :request_forgery_protection_token, :template, :params, :session, :cookies, :response, :headers,
Expand Down
4 changes: 2 additions & 2 deletions activesupport/lib/active_support/deprecation.rb
Expand Up @@ -92,7 +92,7 @@ def deprecate(*method_names)
class_eval(<<-EOS, __FILE__, __LINE__)
def #{target}_with_deprecation#{punctuation}(*args, &block)
::ActiveSupport::Deprecation.warn(self.class.deprecated_method_warning(:#{method_name}, #{options[method_name].inspect}), caller)
#{target}_without_deprecation#{punctuation}(*args, &block)
send(:#{target}_without_deprecation#{punctuation}, *args, &block)
end
EOS
end
Expand All @@ -109,7 +109,7 @@ def deprecated_method_warning(method_name, message=nil)
end

def deprecation_horizon
'2.0'
'2.2'
end
end

Expand Down

0 comments on commit b30604a

Please sign in to comment.