bnoguchi/everyauth — Issue #163: ejs helpers are missing when everyauth renders layout
Author: rrollins
Created: 2012-01-23 00:11:52+00:00
State: open

I've set up a railwayjs application but it looks like everyauth is not including everything my ejs views need. I'm getting the following exception:

starting step - displayLogin
ReferenceError: /Users/royce/projects/pollenware/c2fo_ui/app/views/layouts/application_layout.ejs:5
3|

4|

<%= title %>

>> 5| <%- stylesheet_link_tag('reset', 'style') %>
6| <%- javascript_include_tag('https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js', 'rails', 'application') %>
7| <%- csrf_meta_tag() %>
8| <%- javascript_include_tag('http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.js') %>

stylesheet_link_tag is not defined

I've defined a password authentication and referenced the layout and view. Although I didn't think referencing the layout explicitly would be necessary. I think everyauth should use whatever the default layout for my app is.

In config/environment.js:

everyauth.password
.loginLocals({
title: 'Login'
})
.getLoginPath('/login') // Uri path to the login page
.postLoginPath('/login') // Uri path that your login form POSTs to
.loginView('main/login.ejs')

.loginLayout('layouts/application_layout.ejs')
.authenticate( function (login, password) {
return true;
})
.getRegisterPath('/register') // Uri path to the registration page
.postRegisterPath('/register') // The Uri path that your registration form POSTs to
.registerView('a string of html; OR the name of the jade/etc-view-engine view')
.validateRegistration( function (newUserAttributes) {
})
.registerUser( function (newUserAttributes) {
})
.loginSuccessRedirect('/main/home');