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
|
def index
|
||||||
@forms = current_user.forms
|
@forms = current_user.forms
|
||||||
|
if @forms.empty?
|
||||||
|
redirect_to new_form_url
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
Loading…
x
Reference in New Issue
Block a user