summaryrefslogtreecommitdiff
path: root/app/controllers/pages_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/pages_controller.rb')
-rw-r--r--app/controllers/pages_controller.rb16
1 files changed, 7 insertions, 9 deletions
diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb
index a684327..2d08dea 100644
--- a/app/controllers/pages_controller.rb
+++ b/app/controllers/pages_controller.rb
@@ -2,26 +2,24 @@ class PagesController < ApplicationController
2 2
3 # Private 3 # Private
4 4
5 before_filter :login_required 5 before_action :login_required
6 6
7 def preview 7 def preview
8 @page = Page.find(params[:id]) 8 @page = Page.find(params[:id])
9 9
10 if @page 10 if @page
11 template = @page.valid_template 11 template = @page.valid_template
12 render( 12 render(
13 :file => template, 13 template: template,
14 :layout => "application" 14 layout: "application"
15 ) 15 )
16 end 16 end
17
18 end 17 end
19 18
20
21 def sort_images 19 def sort_images
22 page = Page.find(params[:id]) 20 page = Page.find(params[:id])
23 page.update_assets(params[:images]) 21 page.update_assets(params[:images])
24 22
25 render :nothing => true, :status => 200 23 head :ok
26 end 24 end
27end 25end