otvorenesudy/otvorenesudy-api

View on GitHub
app/controllers/invites_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
class InvitesController < ApplicationController
  def create
    @invite = Invite.new(create_params)

    if @invite.save
      render :create
    else
      render status: 422, partial: 'error'
    end
  end

  private

  def create_params
    params.require(:invite).permit(:email, :locale)
  end
end