Class: Admin::ImagesController
Instance Attribute Summary
#current_user
Instance Method Summary
collapse
#redirect, underscore
#policy, #verify_policy, #verify_policy_with_proc
inc_number_of_requests, original_title
#render_error
#authenticate!, #deauthenticate!, #logged_in?
Instance Method Details
#create ⇒ Object
13
14
15
16
17
18
19
20
21
22
|
# File 'app/controllers/admin/images_controller.rb', line 13
def create
@image = Image.create(image_params)
if @image.valid?
respond_to do |format|
format.json do
render json: @image, serializer: Admin::ImageSerializer
end
end
end
end
|
#destroy ⇒ Object
31
|
# File 'app/controllers/admin/images_controller.rb', line 31
def destroy; end
|
#edit ⇒ Object
11
|
# File 'app/controllers/admin/images_controller.rb', line 11
def edit; end
|
#index ⇒ Object
5
|
# File 'app/controllers/admin/images_controller.rb', line 5
def index; end
|
#new ⇒ Object
9
|
# File 'app/controllers/admin/images_controller.rb', line 9
def new; end
|
#show ⇒ Object
7
|
# File 'app/controllers/admin/images_controller.rb', line 7
def show; end
|
#update ⇒ Object
24
25
26
27
28
29
|
# File 'app/controllers/admin/images_controller.rb', line 24
def update
@image.update(image_params)
respond_to do |format|
format.json { render action: :show }
end
end
|