ruby on rails - How to render devise/registration/new.html.erb files? -
i facing problem. want render registration , sessions new.htm.erb files in layout/application. have tried create partial both registration , sessions new.html.erb.
i have tried above answer gives error. code:
<%= render :template => "devise/registrations/new", :locals => { :resource => current_user, :resource_name => :user } %>
error:
undefined local variable or method `resource' #<#<class:0xbd605f0>:0xb221c5c>
add application helper
def resource_name :user end def resource @resource ||= user.new end def devise_mapping @devise_mapping ||= devise.mappings[:user] end
Comments
Post a Comment