Class: ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ApplicationController
- Includes:
- TranslationCms::Authenticate
- Defined in:
- app/controllers/application_controller.rb
Direct Known Subclasses
Account::BaseController, CompanyController, ContactsController, DataController, DownloadsController, ExchangeRatesController, FeatureRatesController, FeedbacksController, FeedsController, FileuploadsController, FormatsController, FreeQuoteController, LandingsController, LanguagesController, OrdersController, PagesController, Payments::BaseController, Payments::CheckoutsController, Payments::TransactionsController, PaypalController, PostsController, PricesController, QuestionsController, RegistrationsController, ServicesController, SubscribersController, TestimonialsController, WelcomeController, WritersController
Class Method Summary collapse
-
.caches_page_with_cache_marker(*args, &block) ⇒ Object
add will_cached marker on page caches_page.
Instance Method Summary collapse
-
#raise_not_found! ⇒ Object
Called by last route matching unmatched routes.
Class Method Details
.caches_page_with_cache_marker(*args, &block) ⇒ Object
add will_cached marker on page caches_page
234 235 236 237 238 239 240 241 |
# File 'app/controllers/application_controller.rb', line 234 def caches_page_with_cache_marker(*args, &block) actions = args.dup = actions. append_before_action({ only: actions }.merge()) do @will_cached = true if perform_caching end caches_page_without_cache_marker(*args, &block) end |
Instance Method Details
#raise_not_found! ⇒ Object
Called by last route matching unmatched routes. Raises RoutingError which will be rescued from in the same way as other exceptions.
30 31 32 |
# File 'app/controllers/application_controller.rb', line 30 def raise_not_found! raise ActionController::RoutingError, "No route matches #{params[:unmatched_route]}" end |