Class: Admin::ImagesController

Inherits:
AdminController
  • Object
show all
Defined in:
app/controllers/admin/images_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



15
16
17
18
19
20
21
# File 'app/controllers/admin/images_controller.rb', line 15

def create
  @image = Image.create(image_params)

  respond_to do |format|
    format.json { render_image_json(@image) }
  end
end

#destroyObject



30
# File 'app/controllers/admin/images_controller.rb', line 30

def destroy; end

#editObject



13
# File 'app/controllers/admin/images_controller.rb', line 13

def edit; end

#indexObject



7
# File 'app/controllers/admin/images_controller.rb', line 7

def index; end

#newObject



11
# File 'app/controllers/admin/images_controller.rb', line 11

def new; end

#showObject



9
# File 'app/controllers/admin/images_controller.rb', line 9

def show; end

#updateObject



23
24
25
26
27
28
# File 'app/controllers/admin/images_controller.rb', line 23

def update
  @image.update(image_params)
  respond_to do |format|
    format.json { render_image_json(@image) }
  end
end