Moved views
This commit is contained in:
parent
23fee68790
commit
999509d17f
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user