#645 #556 Add facebook auth management

This commit is contained in:
Daniel O'Connor
2015-08-27 11:56:37 +09:30
parent f6790a5f9b
commit dafee90b24
2 changed files with 13 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ class RegistrationsController < Devise::RegistrationsController
def edit
@twitter_auth = current_member.auth('twitter')
@flickr_auth = current_member.auth('flickr')
@facebook_auth = current_member.auth('facebook')
render "edit"
end

View File

@@ -25,3 +25,15 @@
= link_to "Disconnect", @flickr_auth, :confirm => "Are you sure you want to remove this connection?", :method => :delete, :class => "remove"
- else
=link_to 'Connect to Flickr', '/auth/flickr'
.row
.col-md-12
%p
= image_tag "facebook_32.png", :size => "32x32", :alt => 'Facebook logo'
- if @facebook_auth
You are connected to Facebook as
= succeed "." do
=link_to @facebook_auth.name, "http://facebook.com/profile/#{@facebook_auth.uid}"
= link_to "Disconnect", @facebook_auth, :confirm => "Are you sure you want to remove this connection?", :method => :delete, :class => "remove"
- else
=link_to 'Connect to Facebook', '/auth/facebook'