tangled
alpha
login
or
join now
jcs.org
/
sinatree
0
fork
atom
A skeleton web application configured to use Sinatra and ActiveRecord
0
fork
atom
overview
issues
pulls
pipelines
App: exists? -> exist?
jcs.org
2 years ago
9ab7f766
bad49dc3
+3
-3
1 changed file
expand all
collapse all
unified
split
lib
app.rb
+3
-3
lib/app.rb
···
98
98
@@layouts ||= {}
99
99
cc = cur_controller
100
100
101
101
-
if File.exists?(f = App.root + "/app/views/layouts/#{cc}.erb")
101
101
+
if File.exist?(f = App.root + "/app/views/layouts/#{cc}.erb")
102
102
@@layouts[cc] ||= File.read(f)
103
103
else
104
104
@@layouts["application"] ||= File.read(App.root +
···
196
196
end
197
197
198
198
# per-environment configuration
199
199
-
if File.exists?(_c = "#{App.root}/config/#{App.environment}.rb")
199
199
+
if File.exist?(_c = "#{App.root}/config/#{App.environment}.rb")
200
200
require _c
201
201
end
202
202
203
203
# per-app initialization, not specific to environment
204
204
-
if File.exists?(_c = "#{App.root}/config/app.rb")
204
204
+
if File.exist?(_c = "#{App.root}/config/app.rb")
205
205
require _c
206
206
end
207
207
end