lib/hanami/configuration/views.rb in hanami-2.0.0.alpha8 vs lib/hanami/configuration/views.rb in hanami-2.0.0.beta1

- old
+ new

@@ -9,23 +9,28 @@ # # @since 2.0.0 class Views include Dry::Configurable - setting :parts_path, default: "view/parts" + setting :parts_path, default: "views/parts" attr_reader :base_configuration - private :base_configuration + protected :base_configuration def initialize(*) super @base_configuration = Hanami::View.config.dup configure_defaults end + def initialize_copy(source) + super + @base_configuration = source.base_configuration.dup + end + # Returns the list of available settings # # @return [Set] # # @since 2.0.0 @@ -45,14 +50,14 @@ private def configure_defaults self.paths = ["templates"] self.template_inference_base = "views" - self.layout = "application" + self.layout = "app" end # An inflector for views is not configurable via `config.views.inflector` on an - # `Hanami::Application`. The application-wide inflector is already configurable + # `Hanami::App`. The app-wide inflector is already configurable # there as `config.inflector` and will be used as the default inflector for views. # # A custom inflector may still be provided in an `Hanami::View` subclass, via # `config.inflector=`. NON_FORWARDABLE_METHODS = %i[inflector inflector=].freeze