Add validation

This commit is contained in:
Martin Lensment 2014-09-15 17:27:48 +03:00
parent 76d397465e
commit d286a67cc0
8 changed files with 88 additions and 5 deletions

View file

@ -5,7 +5,7 @@ class Admin::TechContactsController < ApplicationController
def new; end
def create
contact = Contact.find_by(id: params[:tech_contact_id])
contact = Contact.find_by(id: params[:contact_id])
unless contact
flash.now[:alert] = I18n.t('shared.contact_was_not_found')