lib/action_controller/metal/helpers.rb in actionpack-5.1.7 vs lib/action_controller/metal/helpers.rb in actionpack-5.2.0.beta1
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
module ActionController
# The \Rails framework provides a large number of helpers for working with assets, dates, forms,
# numbers and model objects, to name a few. These helpers are available to all templates
# by default.
#
@@ -51,12 +53,11 @@
class << self; attr_accessor :helpers_path; end
include AbstractController::Helpers
included do
- class_attribute :helpers_path, :include_all_helpers
- self.helpers_path ||= []
- self.include_all_helpers = true
+ class_attribute :helpers_path, default: []
+ class_attribute :include_all_helpers, default: true
end
module ClassMethods
# Declares helper accessors for controller attributes. For example, the
# following adds new +name+ and <tt>name=</tt> instance methods to a