Class: Trek::Panels::ImagesController

Inherits:
BaseController show all
Defined in:
app/controllers/trek/panels/images_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/controllers/trek/panels/images_controller.rb', line 9

def create
  respond_to do |format|
    if @object.valid?
      @object.file_attacher.finalize

      format.turbo_stream do
        flash.now[:notice] = t("admin.panels.images.create.success")
      end
    else
      format.turbo_stream do
        flash.now[:alert] = t("admin.panels.images.create.failure")
      end
    end
  end
end

#newObject



6
7
# File 'app/controllers/trek/panels/images_controller.rb', line 6

def new
end