Q:

How to render devise/registration/new.html.erb files?

I am facing this problem. I want to render registration and sessions new.htm.erb files in my layout/application. I have tried to create partial for both registration and sessions new.html.erb.
I have tried the above answer but it gives error. MY code:
<%= render :template => "devise/registrations/new", 
                    :locals => { 
                      :resource => current_user, 
                      :resource_name => :user } %>

Error:
undefined local variable or method `resource' for #<#<Class:0xbd605f0>:0xb221c5c>

A:

Add this to your application helper 
 def resource_name
    :user
  end

  def resource
    @resource ||= User.new
  end

  def devise_mapping
    @devise_mapping ||= Devise.mappings[:user]
  end

