Class: Spina::Admin::EmbedsController
- Inherits:
-
AdminController
- Object
- ActionController::Base
- AdminController
- Spina::Admin::EmbedsController
- Defined in:
- app/controllers/spina/admin/embeds_controller.rb
Instance Method Summary collapse
Methods inherited from AdminController
Instance Method Details
#create ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/spina/admin/embeds_controller.rb', line 8 def create = Spina::Embeds.constantize().new() if .valid? render turbo_stream: turbo_stream.update(:trix_attachment_html, .) else render :new, status: :unprocessable_entity end end |
#new ⇒ Object
4 5 6 |
# File 'app/controllers/spina/admin/embeds_controller.rb', line 4 def new = (Spina::Embeds.constantize() || .first).new end |