Re-render partial inside a modal

Dinna Gonzales
Sun, 08 Jun 2014 00:33:24 -0000

*Inside my home.html.erb. I am rendering a partial inside a modal for my
sign-up.*



  <%= render partial: 'users/form',
:controller=>"users", :action =>"new" %>
&#215;



*In my Users.controller.rb, I am rendering new sign up page if user inputs
incorrect information! *

def create
@user = User.new(user_params)
if @user.save
# session[:remember_token] = @user.id
# @current_user = @user
# session[:remember_token] = @user.id.to_s
flash.now[:success] = "You have succesfully signed up!"
redirect_to users_path
else
               render 'new'
end
end


*What I actually want to accomplish is rerendering the partial inside the
modal once User.save does not work. Please help!!!! :(*

--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/f3647770-f351-44e5-bb21-9052a9dd49fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.