Class: Admin::ImagesController

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

Instance Attribute Summary

Attributes included from PagesCore::Authentication

#current_user

Instance Method Summary collapse

Methods inherited from PagesCore::AdminController

#redirect, underscore

Methods included from PagesCore::StaticCacheController

#disable_static_cache!

Methods included from PagesCore::PoliciesHelper

#policy, #verify_policy, #verify_policy_with_proc

Methods included from PagesCore::ProcessTitler

inc_number_of_requests, original_title

Methods included from PagesCore::ErrorRenderer

#render_error

Methods included from PagesCore::Authentication

#authenticate!, #deauthenticate!, #logged_in?

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