Just the blockers now!!
This commit is contained in:
@@ -24,12 +24,13 @@ class CredentialsController < ApplicationController
|
||||
def create
|
||||
@credential = Credential.new(credential_params)
|
||||
@credential.domain_id = @domain.id
|
||||
|
||||
@credential.email << "@" << @domain.domain
|
||||
respond_to do |format|
|
||||
if @credential.save
|
||||
format.html { redirect_to domain_path(@domain), notice: "Credential was successfully created." }
|
||||
format.json { render :show, status: :created, location: @credential }
|
||||
else
|
||||
@credential.email.sub! ("@" + @domain.domain), ""
|
||||
format.html { render :new, status: :unprocessable_entity }
|
||||
format.json { render json: @credential.errors, status: :unprocessable_entity }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user