Sha256: fe72e85079b90d93dbe6af5ec1532050a1180725c91660518e374c0f6dfd56f4
Contents?: true
Size: 530 Bytes
Versions: 1
Compression:
Stored size: 530 Bytes
Contents
class HomePage::ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception layout proc { |controller| controller.request.xhr? ? false : 'application' } rescue_from ActiveRecord::RecordNotFound, with: :not_found private def not_found(e) if Rails.env.development? raise e else redirect_to root_path, notice: t('general.exceptions.not_found') end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
home_page-0.0.3 | app/controllers/home_page/application_controller.rb |