Show new form if a user does not have a form yet
This commit is contained in:
1 parent
937eca9f79
commit
4ab41ce7dd
1 file changed
+3
@@ -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
|
||||
|
||||
Reference in new issue
Block a user