Class: Qbrick::Cms::CkimagesController

Inherits:
BackendController show all
Defined in:
app/controllers/qbrick/cms/ckimages_controller.rb

Instance Method Summary collapse

Methods inherited from BackendController

#default_url_options, #reset_remembered_locale, #set_content_locale

Instance Method Details

#createObject



8
9
10
11
12
# File 'app/controllers/qbrick/cms/ckimages_controller.rb', line 8

def create
  @func_num = params['CKEditorFuncNum']
  @ck_editor = params['CKEditor']
  @ckimage = Qbrick::Ckimage.create(file: params[:upload])
end

#destroyObject



20
21
22
23
# File 'app/controllers/qbrick/cms/ckimages_controller.rb', line 20

def destroy
  @ckimage = Qbrick::Ckimage.find(params[:id])
  @ckimage.destroy
end

#indexObject



14
15
16
17
18
# File 'app/controllers/qbrick/cms/ckimages_controller.rb', line 14

def index
  @func_num = params['CKEditorFuncNum']
  @ck_editor = params['CKEditor']
  @ckimages = Qbrick::Ckimage.all
end