mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Revert "Avoid deprecation warnings and potential TypeErrors [#4404 state:resolved]"
Revert "protected instance variables added to the deprecated config accessor This reverts commit4bce5ba600
and0ee2d3c89a
.
This commit is contained in:
parent
09b9add8c5
commit
ac015b1d07
3 changed files with 3 additions and 4 deletions
|
@ -6,7 +6,7 @@ module AbstractController
|
||||||
def view_assigns
|
def view_assigns
|
||||||
hash = {}
|
hash = {}
|
||||||
variables = instance_variable_names
|
variables = instance_variable_names
|
||||||
variables -= config.protected_instance_variables if config.respond_to?(:protected_instance_variables)
|
variables -= protected_instance_variables if respond_to?(:protected_instance_variables)
|
||||||
variables.each { |name| hash[name] = instance_variable_get(name) }
|
variables.each { |name| hash[name] = instance_variable_get(name) }
|
||||||
hash
|
hash
|
||||||
end
|
end
|
||||||
|
@ -18,4 +18,4 @@ module AbstractController
|
||||||
view_assigns.each { |k,v| object.instance_variable_set(k, v) }
|
view_assigns.each { |k,v| object.instance_variable_set(k, v) }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -126,7 +126,7 @@ module AbstractController
|
||||||
def view_assigns
|
def view_assigns
|
||||||
hash = {}
|
hash = {}
|
||||||
variables = instance_variable_names
|
variables = instance_variable_names
|
||||||
variables -= config.protected_instance_variables if config.respond_to?(:protected_instance_variables)
|
variables -= protected_instance_variables if respond_to?(:protected_instance_variables)
|
||||||
variables.each { |name| hash[name.to_s[1..-1]] = instance_variable_get(name) }
|
variables.each { |name| hash[name.to_s[1..-1]] = instance_variable_get(name) }
|
||||||
hash
|
hash
|
||||||
end
|
end
|
||||||
|
|
|
@ -154,7 +154,6 @@ module ActionController
|
||||||
deprecated_config_accessor :helpers_path
|
deprecated_config_accessor :helpers_path
|
||||||
deprecated_config_accessor :javascripts_dir
|
deprecated_config_accessor :javascripts_dir
|
||||||
deprecated_config_accessor :page_cache_directory
|
deprecated_config_accessor :page_cache_directory
|
||||||
deprecated_config_accessor :protected_instance_variables
|
|
||||||
deprecated_config_accessor :relative_url_root, "relative_url_root is ineffective. Please stop using it"
|
deprecated_config_accessor :relative_url_root, "relative_url_root is ineffective. Please stop using it"
|
||||||
deprecated_config_accessor :stylesheets_dir
|
deprecated_config_accessor :stylesheets_dir
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue