Sha256: 73cb5f9baedd8a3a5944f0a1829ca6a2b48ad4fd319c95324da69fa0884629a8
Contents?: true
Size: 817 Bytes
Versions: 38
Compression:
Stored size: 817 Bytes
Contents
module SocialStream module Controllers # Common methods added to ApplicationController module CancanDeviseIntegration extend ActiveSupport::Concern private # Catch some authorization errors: # # * Redirect to home when the user changes the session and the resource # is not accesible with the new representation # # * Redirect to login if the user is trying to access a protected resource # and she is not authenticated def rescue_from_access_denied(exception) if user_signed_in? if params[:s].present? && controller_name != 'home' redirect_to :home else raise exception end else redirect_to new_user_session_path end end end end end
Version data entries
38 entries across 38 versions & 2 rubygems