days 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/days/app.rb +8 -0
- data/lib/days/config.rb +1 -1
- data/lib/days/models/entry.rb +2 -0
- data/lib/days/version.rb +1 -1
- data/scripts/lokka_export.rb +1 -1
- metadata +1 -1
data/lib/days/app.rb
CHANGED
@@ -53,6 +53,14 @@ module Days
|
|
53
53
|
helpers Helpers
|
54
54
|
helpers Kaminari::Helpers::SinatraHelpers
|
55
55
|
|
56
|
+
before do
|
57
|
+
# for thread safe
|
58
|
+
begin
|
59
|
+
ActionView::LogSubscriber.log_subscribers.clear
|
60
|
+
rescue NameError, NoMethodError
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
56
64
|
set :admin_only do |_|
|
57
65
|
condition do
|
58
66
|
unless logged_in?
|
data/lib/days/config.rb
CHANGED
@@ -26,7 +26,7 @@ module Days
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def establish_db_connection(force=false)
|
29
|
-
if
|
29
|
+
if Days::App.environment.to_sym == :development && (self.has_key?(:activerecord_log) ? true : self.activerecord_log == true)
|
30
30
|
ActiveRecord::Base.logger = Logger.new($stdout)
|
31
31
|
end
|
32
32
|
|
data/lib/days/models/entry.rb
CHANGED
data/lib/days/version.rb
CHANGED
data/scripts/lokka_export.rb
CHANGED