Нет описания

api_controller.rb 316B

12345678910111213141516171819
  1. class APIController < ApplicationController
  2. before_filter :set_current_user, :authenticate_user!
  3. def show
  4. render json: current_user
  5. end
  6. def update
  7. current_user.update api_params
  8. head :no_content
  9. end
  10. private
  11. def api_params
  12. params.require(:api).permit(:email, :displayName)
  13. end
  14. end