Class: Admin::PagesController

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

Instance Method Summary collapse

Instance Method Details

#indexObject



15
16
17
18
# File 'app/controllers/admin/pages_controller.rb', line 15

def index
  @homepage = Page.find_by_parent_id(nil)
  response_for :plural
end

#newObject



20
21
22
23
24
# File 'app/controllers/admin/pages_controller.rb', line 20

def new
  @page = self.model = model_class.new_with_defaults(config)
  assign_page_attributes
  response_for :new
end