Sha256: e19aa3f586964e9bed4a6309b4f4acf9e0e7c0dc7eec220a712eb863f4a92d79
Contents?: true
Size: 592 Bytes
Versions: 12
Compression:
Stored size: 592 Bytes
Contents
class ApplicationController < ActionController::Base protect_from_forgery # Overwriting the sign_out redirect path method def after_sign_in_path_for(resource_or_scope) crowdblog_url end def authenticate! # sign out the user if trying to sign another user sign_out current_user if params['auth_token'] && current_user # if no one signed in, use the default user unless user_signed_in? user = Crowdblog::User.find_by_email('foo@crowdint.com') || Crowdblog::User.create!(email: 'foo@crowdint.com', is_publisher: true) sign_in user end end end
Version data entries
12 entries across 12 versions & 1 rubygems