Class: Cms::PageComponentsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/cms/page_components_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#no_browser_caching

Instance Method Details

#newObject



6
7
8
9
# File 'app/controllers/cms/page_components_controller.rb', line 6

def new
  @default_type = Cms::ContentType.default
  @content_types = Cms::ContentType.other_connectables
end

#updateObject



11
12
13
14
15
16
17
18
# File 'app/controllers/cms/page_components_controller.rb', line 11

def update
  @page_component = PageComponent.new(params[:id], params[:content])
  if @page_component.save
    respond_with(@page_component)
  else
    respond_with(@page_component.errors, :status => :unprocessable_entity)
  end
end