Class: Rich::CmsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/rich/cms_controller.rb

Instance Method Summary collapse

Instance Method Details

#displayObject



5
6
7
8
# File 'app/controllers/rich/cms_controller.rb', line 5

def display
  (session[:rich_cms] ||= {})[:display] = params[:display]
  request.xhr? ? render(:nothing => true) : redirect_to(request.referrer)
end

#positionObject



10
11
12
13
# File 'app/controllers/rich/cms_controller.rb', line 10

def position
  session[:rich_cms][:position] = params[:position]
  render :nothing => true
end

#updateObject



15
16
17
# File 'app/controllers/rich/cms_controller.rb', line 15

def update
  render :json => Cms::Content::Item.new(params[:content_item]).save
end