Class: Admin::Kitsune::PagesController

Inherits:
KitsuneController
  • Object
show all
Defined in:
app/controllers/admin/kitsune/pages_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



14
15
16
17
18
19
20
21
# File 'app/controllers/admin/kitsune/pages_controller.rb', line 14

def create
  @page = ::Page.new(params[:page])
  if @page.save
    redirect_to url_for(:controller => 'admin/kitsune/pages')
  else
    render 'new'
  end
end

#indexObject



6
7
8
# File 'app/controllers/admin/kitsune/pages_controller.rb', line 6

def index
  @pages = ::Page.all
end

#newObject



10
11
12
# File 'app/controllers/admin/kitsune/pages_controller.rb', line 10

def new
  @page = ::Page.new
end

#updateObject



23
24
25
26
27
28
29
# File 'app/controllers/admin/kitsune/pages_controller.rb', line 23

def update
  if @page.update_attributes(params[:page])
    redirect_to url_for(:controller => 'admin/kitsune/pages')
  else
    render 'edit'
  end
end