Permalink
Browse files

just create guards dir if it does not exist

  • Loading branch information...
mkristian committed Sep 5, 2011
1 parent 35cbc98 commit 53e3702ed43a274f31c1b006cc43de78c8edd673
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/ixtlan/guard/railtie.rb
@@ -2,6 +2,7 @@
require 'ixtlan/guard/guard_ng'
require 'ixtlan/guard/guard_rails'
require 'logger'
+require 'fileutils'
module Ixtlan
module Guard
@@ -18,6 +19,7 @@ class Railtie < Rails::Railtie
:cache => app.config.cache_classes
}
options[:logger] = logger unless defined?(Slf4r)
+ FileUtils.mkdir_p(app.config.guards_dir)
app.config.guard = Ixtlan::Guard::GuardNG.new(options)
::ActionController::Base.send(:include, Ixtlan::ActionController::Guard)

0 comments on commit 53e3702

Please sign in to comment.