1
0
Fork 0

Moved views

This commit is contained in:
Gregory Eremin 2013-07-11 02:09:55 +07:00
parent 23fee68790
commit 999509d17f
7 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,5 @@
class ErrorPages < Sinatra::Base class ErrorPages < Sinatra::Base
set :views, File.expand_path('../../views', __FILE__) set :views, File.expand_path('../../app/views', __FILE__)
not_found do not_found do
status 404 status 404

View File

@ -24,6 +24,7 @@ require 'lib/assets'
class Pastemaster < Sinatra::Application class Pastemaster < Sinatra::Application
set :server, 'unicorn' set :server, 'unicorn'
set :public_folder, 'public' set :public_folder, 'public'
set :views, File.expand_path('../app/views', __FILE__)
set :slim, pretty: true set :slim, pretty: true
@ -46,7 +47,7 @@ class Pastemaster < Sinatra::Application
end end
get '/:id/:key' do get '/:id/:key' do
@paste = Paste.find(params[:id]) @paste = Paste.find(params[:id].to_i)
return not_found unless @paste return not_found unless @paste
begin begin