mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 00:08:46 +00:00
Replace use_pack, layouts/theme and @theme by new helpers
Packs are now loaded from views, just like upstream, and are identified by their filenames. The definition of `theme.yml` has changed as such: - `pack_directory` is now required - `pack` is now unused - `signed_in_preload` has been introduced
This commit is contained in:
@@ -165,10 +165,7 @@ class ApplicationController < ActionController::Base
|
||||
|
||||
def respond_with_error(code)
|
||||
respond_to do |format|
|
||||
format.any do
|
||||
use_pack 'error'
|
||||
render "errors/#{code}", layout: 'error', status: code, formats: [:html]
|
||||
end
|
||||
format.any { render "errors/#{code}", layout: 'error', status: code, formats: [:html] }
|
||||
format.json { render json: { error: Rack::Utils::HTTP_STATUS_CODES[code] }, status: code }
|
||||
end
|
||||
end
|
||||
@@ -177,10 +174,7 @@ class ApplicationController < ActionController::Base
|
||||
return unless self_destruct?
|
||||
|
||||
respond_to do |format|
|
||||
format.any do
|
||||
use_pack 'error'
|
||||
render 'errors/self_destruct', layout: 'auth', status: 410, formats: [:html]
|
||||
end
|
||||
format.any { render 'errors/self_destruct', layout: 'auth', status: 410, formats: [:html] }
|
||||
format.json { render json: { error: Rack::Utils::HTTP_STATUS_CODES[410] }, status: 410 }
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user