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
|
||||
# * +User::ActiveRecord_Relation+ -> user
|
||||
def self.find_for_auth(auth, current_user = nil)
|
||||
|
||||
user = current_user
|
||||
|
||||
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?
|
||||
user.email = auth.info.email
|
||||
user.password = Devise.friendly_token[0,20]
|
||||
user.password = Devise.friendly_token[0, 20]
|
||||
user.skip_confirmation!
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ Osem::Application.routes.draw do
|
|||
|
||||
get 'conference/show'
|
||||
|
||||
devise_for :users, :controllers => { registrations: :registrations,
|
||||
devise_for :users, controllers: { registrations: :registrations,
|
||||
omniauth_callbacks: 'users/omniauth_callbacks' },
|
||||
:path => 'accounts'
|
||||
path: 'accounts'
|
||||
|
||||
namespace :admin do
|
||||
resources :users
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class CreateOpenids< ActiveRecord::Migration
|
||||
class CreateOpenids < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :openids do |t|
|
||||
t.string :provider
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ module OmniauthMacros
|
|||
})
|
||||
end
|
||||
|
||||
def mock_auth_new_user_fb
|
||||
def mock_auth_new_user_fb
|
||||
OmniAuth.config.mock_auth[:facebook] = OmniAuth::AuthHash.new({
|
||||
provider: 'google',
|
||||
uid: 'facebook-test-uid-1',
|
||||
|
|
@ -61,4 +61,4 @@ module OmniauthMacros
|
|||
}
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue