Show new form if a user does not have a form yet
This commit is contained in:
parent
937eca9f79
commit
4ab41ce7dd
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user