Class: Comable::PagesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Comable::PagesController
- Defined in:
- app/controllers/comable/pages_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#show ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'app/controllers/comable/pages_controller.rb', line 3 def show if Rails::VERSION::MAJOR == 3 @page = Comable::Page.find(params[:id]) else @page = Comable::Page.friendly.find(params[:id]) end fail ActiveRecord::RecordNotFound unless @page && (@page.published? || preview?) end |