Class: Publinator::HomeController

Inherits:
ApplicationController show all
Defined in:
app/controllers/publinator/home_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#body_id, #current_controller, #current_domain, #current_layout, #current_site, #current_site_name

Instance Method Details

#indexObject



5
6
7
8
9
10
11
# File 'app/controllers/publinator/home_controller.rb', line 5

def index
  begin
    render "home/index"
  rescue ActionView::MissingTemplate
    render "publinator/home/index", :layout => current_layout
  end
end

#pageObject



13
14
15
16
17
18
19
20
21
# File 'app/controllers/publinator/home_controller.rb', line 13

def page
  @publication = Publinator::Publication.get_by_slug(params[:slug])
  if @publication.nil?
    raise ActionController::RoutingError.new('Not Found')
    return
  else
    # todo: render a template for the Publishable, if one exists
  end
end