Sha256: 25b580d6945fd8f1c9dd0b74b717251f1742b88c2991419a0de4ac2ff9d8f398

Contents?: true

Size: 707 Bytes

Versions: 4

Compression:

Stored size: 707 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

4 entries across 4 versions & 1 rubygems

Version Path
aetherg-0.1.7 lib/templates/config/initializers/environment.rb
aetherg-0.1.5 lib/templates/config/initializers/environment.rb
aetherg-0.1.4 lib/templates/config/initializers/environment.rb
aetherg-0.1.3 lib/templates/config/initializers/environment.rb