app/controllers/application_controller.rb
def correct_user_or_shared_page
      if session[request.path] != "shared"
        # Run normal callbacks
        signed_in_user && correct_user
      end
    end
# Requires session[request.path] to be set to 'shared' or a user
# to be signed in as same one for which the action is performed.
Requires session[request.path] to be set to 'shared' or a user
to be signed in as same one for which the action is performed.
Requires session [ request . path ] to be set to ' shared ' or a user to be signed in as same one for which the action is performed .
def correct_user_or_shared_page
      if session[request.path] != "shared"
        signed_in_user && correct_user
      end
    end
def correct_user_or_shared_page if session [ request . path ] != "shared" signed_in_user && correct_user end end
Requires session[request.path] to be set to 'shared' or a user
to be signed in as same one for which the action is performed.
Requires session [ request . path ] to be set to ' shared ' or a user to be signed in as same one for which the action is performed .
# Run normal callbacks