2019-01-16 16:28:25 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# API Controller for resources of type Stylesheet
|
|
|
|
# Stylesheets are used to customize the appearance of fab-manager
|
2016-03-23 18:39:41 +01:00
|
|
|
class API::StylesheetsController < API::ApiController
|
|
|
|
caches_page :show # magic happens here
|
|
|
|
|
|
|
|
def show
|
|
|
|
@stylesheet = Stylesheet.find(params[:id])
|
|
|
|
respond_to do |format|
|
|
|
|
format.html # regular ERB template
|
2019-01-16 16:28:25 +01:00
|
|
|
format.css { render text: @stylesheet.contents, content_type: 'text/css' }
|
2016-03-23 18:39:41 +01:00
|
|
|
end
|
|
|
|
end
|
2019-01-16 16:28:25 +01:00
|
|
|
end
|