blob: 2d08dead6795dacbd867d1b912da781008f28594 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
class PagesController < ApplicationController
# Private
before_action :login_required
def preview
@page = Page.find(params[:id])
if @page
template = @page.valid_template
render(
template: template,
layout: "application"
)
end
end
def sort_images
page = Page.find(params[:id])
page.update_assets(params[:images])
head :ok
end
end
|