roshiro/openws_one

View on GitHub
app/controllers/users_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
# Controller to handle User actions
class UsersController < ApplicationController
  before_filter :authenticate_user!
  before_filter :load_user_profile, only: :profile

  def profile
    render json: @profile, status: :ok
  end

  private

  def load_user_profile
    @profile ||= {
      email: 'rafael.oshiro@gmail.com',
      api_key: SecureRandom.uuid
    }
  end
end