Skip to content
Browse files

Remove unecessary config_accessors.

  • Loading branch information...
1 parent ba86892 commit c4ef3d34ee4b901a591af8b48012c9233e2fe4a3 @josevalim josevalim committed Dec 24, 2011
View
8 actionpack/lib/abstract_controller/rendering.rb
@@ -35,7 +35,7 @@ module Rendering
include AbstractController::ViewPaths
included do
- config_accessor :protected_instance_variables, :instance_reader => false
+ class_attribute :protected_instance_variables
self.protected_instance_variables = []
end
@@ -59,12 +59,6 @@ def view_context_class
attr_internal_writer :view_context_class
- # Explicitly define protected_instance_variables so it can be
- # inherited and overwritten by other modules if needed.
- def protected_instance_variables
- config.protected_instance_variables
- end
-
def view_context_class
@_view_context_class ||= self.class.view_context_class
end
View
6 actionpack/lib/action_controller/caching/pages.rb
@@ -42,20 +42,20 @@ module Pages
# For Rails, this directory has already been set to Rails.public_path (which is usually set to <tt>Rails.root + "/public"</tt>). Changing
# this setting can be useful to avoid naming conflicts with files in <tt>public/</tt>, but doing so will likely require configuring your
# web server to look in the new location for cached files.
- config_accessor :page_cache_directory
+ class_attribute :page_cache_directory
self.page_cache_directory ||= ''
# Most Rails requests do not have an extension, such as <tt>/weblog/new</tt>. In these cases, the page caching mechanism will add one in
# order to make it easy for the cached files to be picked up properly by the web server. By default, this cache extension is <tt>.html</tt>.
# If you want something else, like <tt>.php</tt> or <tt>.shtml</tt>, just set Base.page_cache_extension. In cases where a request already has an
# extension, such as <tt>.xml</tt> or <tt>.rss</tt>, page caching will not add an extension. This allows it to work well with RESTful apps.
- config_accessor :page_cache_extension
+ class_attribute :page_cache_extension
self.page_cache_extension ||= '.html'
# The compression used for gzip. If false (default), the page is not compressed.
# If can be a symbol showing the ZLib compression method, for example, :best_compression
# or :best_speed or an integer configuring the compression level.
- config_accessor :page_cache_compression
+ class_attribute :page_cache_compression
self.page_cache_compression ||= false
end
View
2 actionpack/lib/action_controller/metal/helpers.rb
@@ -56,7 +56,7 @@ module Helpers
include AbstractController::Helpers
included do
- config_accessor :helpers_path, :include_all_helpers
+ class_attribute :helpers_path, :include_all_helpers
self.helpers_path ||= []
self.include_all_helpers = true
end

0 comments on commit c4ef3d3

Please sign in to comment.
Something went wrong with that request. Please try again.