app/controllers/valid_emails_controller.rb
# shows a particular vaild email with id: id
shows a particular vaild email with id: id
shows a particular vaild email with id : id
def show
    redirect_to '/tasks' if current_user.role != 'admin' && current_user.role != 'moderator'
    @valid_email = ValidEmail.find(params[:id])
  end
def show redirect_to '/tasks' if current_user . role != 'admin' && current_user . role != 'moderator' @valid_email = ValidEmail . find ( params [ :id ] ) end
shows a particular vaild email with id: id
shows a particular vaild email with id : id
# only allow admins and moderators to whitelist emails