Show a modal right after signup?
- by user1494756
When a user signup at my page I want them to be redirected to the root_path(this I have figured out how to do in the user controller). But then I want a modal to show in front of this page(and this should only happen the first time the user see this root/home page(like a flash message).
Here is my create method in the user controller:
def create
@user = User.new(params[:user])
if @user.save
sign_in @user
redirect_to root_path
else
render 'new'
end
end
The modal is placed in app/views/layouts/_modal.html.erb. Does anybody know how to make this happen?
(Jepp, I am a newbie :)