diff --git a/app/controllers/services_controller.rb b/app/controllers/services_controller.rb index d81ca389..d49a55a5 100644 --- a/app/controllers/services_controller.rb +++ b/app/controllers/services_controller.rb @@ -35,4 +35,14 @@ class ServicesController < ApplicationController flash[:success] = 'Successfully removed service' redirect_to services_path end + + private + + def origin + request.env['omniauth.origin'] + end + + def omniauth_hash + request.env['omniauth.auth'] + end end diff --git a/app/models/service.rb b/app/models/service.rb index 5457d168..5f924544 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -1,4 +1,6 @@ class Service < ActiveRecord::Base + attr_accessor :provider, :info + belongs_to :user validates_uniqueness_of :uid, scope: :type