Newer
Older
Raphael Sofaer
a validé
class ApisController < ApplicationController
authenticate_with_oauth
before_filter :set_user_from_oauth
Raphael Sofaer
a validé
def me
@person = @user.person
render :json => {:birthday => @person.profile.birthday, :name => @person.name}
Raphael Sofaer
a validé
private
def set_user_from_oauth
@user = request.env['oauth2'].resource_owner