* Add: #406 ユーザーのカスタムCSS * Fix lint * Fix lint * カスタムCSSの保存先を変更 * キャッシュを考慮して別URLに変更
This commit is contained in:
parent
5ffd7593f1
commit
665c632d66
28 changed files with 283 additions and 4 deletions
16
app/controllers/user_custom_css_controller.rb
Normal file
16
app/controllers/user_custom_css_controller.rb
Normal file
|
@ -0,0 +1,16 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class UserCustomCssController < ActionController::Base # rubocop:disable Rails/ApplicationController
|
||||
before_action :authenticate_user!
|
||||
|
||||
def show
|
||||
render content_type: 'text/css'
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def user_custom_css
|
||||
current_user.custom_css_text
|
||||
end
|
||||
helper_method :user_custom_css
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue