Re-render partial inside a modal

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” %>


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

def create

	@user =


		# session[:remember_token] =

		# @current_user = @user

		# session[:remember_token] =[:success] = "You have succesfully signed up!"

		redirect_to users_path


       render 'new'



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

For a response to update only a portion of the page instead of the whole page it has to be an ajax post. Rails does have some builtin support for ajax form submission ( You'll have to write some javascript to handle the success/failure cases yourself (in particular the redirect in the success case will no longer do what you want - you have to do the redirect client side)