Skip to content
Snippets Groups Projects
Commit 20b13345 authored by Israel Barreto Sant'Anna's avatar Israel Barreto Sant'Anna
Browse files

Merge branch 'master' into fix_attachment

parents 139c3041 c419d909
No related branches found
No related tags found
No related merge requests found
......@@ -77,7 +77,8 @@ require 'open-uri'
# break out provider attribute assignment for easy method extension
def assign_provider_attrs(user, auth_hash)
avatar = auth_hash['provider']=='google_oauth2' ? open(auth_hash['info']['image']) : auth_hash['info']['image']
avatar = auth_hash['provider']=='google_oauth2' ? open(auth_hash['info']['image']) : auth_hash['info']['image']
user.assign_attributes({
nickname: auth_hash['info']['nickname'],
......
......@@ -4,8 +4,12 @@ class UserDeviseSerializer < ActiveModel::Serializer
object.avatar.url
end
def cover_file_name
object.cover.url
end
attributes :id, :email, :provider, :avatar_file_name, :avatar_content_type, :uid, :name, :avatar_file_size, :avatar_updated_at,
:bookmarks_count, :user_category_id, :score, :follows_count, :deleted_at, :description, :likes_count,
:learning_objects_count, :collections_count
:learning_objects_count, :collections_count, :cover_file_name, :cover_content_type, :cover_file_size, :cover_updated_at
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment