Show new form if a user does not have a form yet

This commit is contained in:
2020-05-08 14:38:44 +02:00
parent 937eca9f79
commit 4ab41ce7dd

View File

@@ -17,6 +17,9 @@ class FormsController < ApplicationController
def index
@forms = current_user.forms
if @forms.empty?
redirect_to new_form_url
end
end
def create