plataformatec/devise — Issue #1370: scoped_views = true + AJAX = missing template?
Author: costa
Created: 2011-10-09 14:07:49+00:00
State: open

Hello,

(rails 3.0.10, devise 1.4.7)

I have a "devised" model Visitor (which I have a custom authentication strategy for), and I'm getting
`ActionView::MissingTemplate (Missing template devise/sessions/create with {:handlers=>[:erb, :rjs, :builder, :rhtml, :rxml, :arb, :haml], :formats=>[:js, :html], :locale=>[:en, :en]}`
when I successfully authenticate at `/visitors/sign_in` (from a form at `new_visitor_session_path` which renders the correct template),
even though I have `app/views/visitors/sessions/create.js.rjs` (again, `new.html.haml` renders correctly from the same directory).

When I copy it to `app/views/devise/sessions/create.js.rjs`, the sign-in works, though i wouldn't want a single view for all the "devised' models, of course.

Also, probably related: It doesn't seem to be documented, but I've managed to change the layout for a sign-in page by creating `app/views/layouts/devise/sessions.html.haml`, but again, i might want different layouts for different models and placing the layout at `app/views/layouts/visitors/sessions.html.haml` doesn't seem to do the job. Can you please shed any light on this?

Thanks!