Skip to content

Commit

Permalink
Make it possible to override dynamic_templates in your app
Browse files Browse the repository at this point in the history
  • Loading branch information
judofyr committed May 22, 2010
1 parent b74ace4 commit 60d9a2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 0 additions & 2 deletions bin/camping
Expand Up @@ -2,8 +2,6 @@

$:.unshift File.dirname(__FILE__) + "/../lib"

ENV['DYNAMIC_TEMPLATES']=true.to_s

require 'camping'
require 'camping/server'

Expand Down
5 changes: 4 additions & 1 deletion lib/camping/server.rb
Expand Up @@ -99,7 +99,10 @@ def initialize(*)
super
@reloader = Camping::Reloader.new
@reloader.on_reload do |app|
app.options[:dynamic_templates] = true if ENV['DYNAMIC_TEMPLATES']
if !app.options.has_key?(:dynamic_templates)
app.options[:dynamic_templates] = true
end

if !Camping::Models.autoload?(:Base) && options[:database]
Camping::Models::Base.establish_connection(
:adapter => 'sqlite3',
Expand Down

0 comments on commit 60d9a2f

Please sign in to comment.