lib/spontaneous/rack/back.rb in spontaneous-0.2.0.beta5 vs lib/spontaneous/rack/back.rb in spontaneous-0.2.0.beta6

- old
+ new

@@ -47,10 +47,11 @@ end def self.editing_app(site) ::Rack::Builder.app do use Scope::Edit, site + use Transaction, site use ApplicationAssets use UnsupportedBrowser use Authenticate::Init, site use Login use Authenticate::Edit # Everything after this handler requires authentication @@ -72,10 +73,11 @@ def self.preview_app(site) ::Rack::Builder.app do use ::Rack::Lint if Spontaneous.development? use Scope::Preview, site + use Transaction, site use Authenticate::Init, site # Preview authentication redirects to /@spontaneous rather than # showing a login screen. This way if you go to the root of the site # as an unauthorised user (say for the first time) you will get sent # to the editing interface wrapper rather than being presented with @@ -97,10 +99,10 @@ end run Preview end end - def self.application(site) + def self.application(site = ::Spontaneous.instance) app = ::Rack::Builder.new do site.back_controllers.each do |namespace, controller| map(namespace) do use Scope::Edit, site use Authenticate::Init, site