blob: f5609ebf27cc1fcc2aaf0c1459b13166de74be8c (
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
26
27
|
class PagesController < ApplicationController
# Private
before_action :login_required
def preview
@page = Page.find(params[:id])
if @page
template = @page.valid_template
render(
:file => template,
:layout => "application"
)
end
end
def sort_images
page = Page.find(params[:id])
page.update_assets(params[:images])
render :nothing => true, :status => 200
end
end
|