ruby on rails - RoR: rendering devise login into application layout -
i'm trying render devise sign in page "devise/sessions/new" application layout, i'm wondering how so?
if this:
<%= render "devise/sessions/new" %>
i error:
actionview::missingtemplate in static#index missing partial devise/sessions/new {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}. searched in:
if try this:
<%= render :template => "devise/sessions/new" %>
i error:
nameerror in users#show undefined local variable or method `resource'
where have form:
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) |f| %>
i'm trying bring sign in form application layout, if possible.
whats name have used sign in page. if - "new.html.erb", rename "_new.html.erb". then,
<%= render "devise/sessions/new" %>
will work.
for second issue, coming again after above thing.
nameerror in users#show undefined local variable or method `resource'
as can see, no variable can found in 'show' action, need define variable. which, form data. go through, forms , flow rails app, once again.
Comments
Post a Comment