blob: a40bf10260ca0286af52aace579b0956d192c187 (
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])
head :ok
end
end
|