1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/app/controllers/api/stylesheets_controller.rb
Sylvain 0cd841da33 rubocop api controllers
TODO:
 - events controller
 - availabilies controller
 - members controller
 - plans controller
2019-01-16 16:28:25 +01:00

16 lines
468 B
Ruby

# frozen_string_literal: true
# API Controller for resources of type Stylesheet
# Stylesheets are used to customize the appearance of fab-manager
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' }
end
end
end