lib/lotus/loader.rb in lotusrb-0.3.1 vs lib/lotus/loader.rb in lotusrb-0.3.2

- old
+ new

@@ -1,13 +1,13 @@ require 'lotus/utils/class' require 'lotus/utils/kernel' require 'lotus/utils/string' require 'lotus/routes' require 'lotus/routing/default' -require 'lotus/action/cookies' require 'lotus/action/session' require 'lotus/config/security' +require 'lotus/action/routing_helpers' module Lotus # Load an application # # @since 0.1.0 @@ -54,13 +54,15 @@ Lotus::Config::Security::X_FRAME_OPTIONS_HEADER => config.security.x_frame_options, Lotus::Config::Security::CONTENT_SECURITY_POLICY_HEADER => config.security.content_security_policy }) if config.cookies.enabled? + require 'lotus/action/cookies' prepare { include Lotus::Action::Cookies } cookies config.cookies.default_options end prepare { include Lotus::Action::Session } if config.sessions.enabled? + prepare { include Lotus::Action::RoutingHelpers } config.controller.__apply(self) end namespace.const_set('Controller', controller)