lib/ditty/helpers/authentication.rb in ditty-0.4.1 vs lib/ditty/helpers/authentication.rb in ditty-0.6.0

- old
+ new

@@ -16,11 +16,11 @@ env['rack.session'] = {} if env['rack.session'].nil? env['rack.session']['user_id'] = user.id if user end def current_user_id - return env['omniauth.auth'].uid if env['omniauth.auth'] - env['rack.session']['user_id'] if env['rack.session'] + return env['rack.session']['user_id'] if env['rack.session'] + env['omniauth.auth'].uid if env['omniauth.auth'] end def authenticate authenticated? end