Sha256: 57935aad7e88e93380f6c8531638fd43188af9b777f78a950e4da63f038aa8e1

Contents?: true

Size: 700 Bytes

Versions: 3

Compression:

Stored size: 700 Bytes

Contents

class <%= @name.camelcase %>::Application
  before do
    content_type 'text/html'
  end

  set :sessions, true
  set :views, Proc.new { File.join(root, "/app/views") }

  configure do
    enable :logging
    enable :static_cache_control
    file = File.new("#{root}/log/#{environment.to_s}.log", 'a+')
    ActiveRecord::Base.logger = Logger.new(file) unless (@no_database || @database == 'mongodb' || @database == 'mongo')
    file.sync = true
    use Rack::CommonLogger, file

    # set CSRF
    # use Rack::Session::Cookie, secret: $app_settings["csrf_token"]
    # use Rack::Csrf, :raise => true

    # set layouts
    set :erb, :layout => :'layouts/application', :escape_html => true
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aetherg-0.1.2 lib/templates/config/initializers/environment.rb
aetherg-0.1.1 lib/templates/config/initializers/environment.rb
aetherg-0.1.0 lib/templates/config/initializers/environment.rb