1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-04 15:24:23 +01:00
fab-manager/app/controllers/api/stylesheets_controller.rb

16 lines
468 B
Ruby
Raw Normal View History

# 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
format.css { render text: @stylesheet.contents, content_type: 'text/css' }
2016-03-23 18:39:41 +01:00
end
end
end