Skip to content
Extraits de code Groupes Projets
apis_controller.rb 461 octets
Newer Older
  • Learn to ignore specific revisions
  • class ApisController < ApplicationController
      authenticate_with_oauth
      before_filter :set_user_from_oauth
    
      respond_to :json
    
        render :json => {
                          :birthday => @person.profile.birthday,
                          :name => @person.name,
                          :uid => @user.username
                        }
    
      private
      def set_user_from_oauth
        @user = request.env['oauth2'].resource_owner
    
    maxwell's avatar
    maxwell a validé
      end
    end