some houndci fixes
This commit is contained in:
parent
de58ddde50
commit
0beed70d7f
4 changed files with 6 additions and 7 deletions
|
|
@ -25,7 +25,6 @@ class User < ActiveRecord::Base
|
||||||
# ====Returns
|
# ====Returns
|
||||||
# * +User::ActiveRecord_Relation+ -> user
|
# * +User::ActiveRecord_Relation+ -> user
|
||||||
def self.find_for_auth(auth, current_user = nil)
|
def self.find_for_auth(auth, current_user = nil)
|
||||||
|
|
||||||
user = current_user
|
user = current_user
|
||||||
|
|
||||||
if user.nil? # No current user available, user is not already logged in
|
if user.nil? # No current user available, user is not already logged in
|
||||||
|
|
@ -34,7 +33,7 @@ class User < ActiveRecord::Base
|
||||||
|
|
||||||
if user.new_record?
|
if user.new_record?
|
||||||
user.email = auth.info.email
|
user.email = auth.info.email
|
||||||
user.password = Devise.friendly_token[0,20]
|
user.password = Devise.friendly_token[0, 20]
|
||||||
user.skip_confirmation!
|
user.skip_confirmation!
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@ Osem::Application.routes.draw do
|
||||||
|
|
||||||
get 'conference/show'
|
get 'conference/show'
|
||||||
|
|
||||||
devise_for :users, :controllers => { registrations: :registrations,
|
devise_for :users, controllers: { registrations: :registrations,
|
||||||
omniauth_callbacks: 'users/omniauth_callbacks' },
|
omniauth_callbacks: 'users/omniauth_callbacks' },
|
||||||
:path => 'accounts'
|
path: 'accounts'
|
||||||
|
|
||||||
namespace :admin do
|
namespace :admin do
|
||||||
resources :users
|
resources :users
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateOpenids< ActiveRecord::Migration
|
class CreateOpenids < ActiveRecord::Migration
|
||||||
def change
|
def change
|
||||||
create_table :openids do |t|
|
create_table :openids do |t|
|
||||||
t.string :provider
|
t.string :provider
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ module OmniauthMacros
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
def mock_auth_new_user_fb
|
def mock_auth_new_user_fb
|
||||||
OmniAuth.config.mock_auth[:facebook] = OmniAuth::AuthHash.new({
|
OmniAuth.config.mock_auth[:facebook] = OmniAuth::AuthHash.new({
|
||||||
provider: 'google',
|
provider: 'google',
|
||||||
uid: 'facebook-test-uid-1',
|
uid: 'facebook-test-uid-1',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue