everyauth icon indicating copy to clipboard operation
everyauth copied to clipboard

ejs helpers are missing when everyauth renders layout

Open rrollins opened this issue 13 years ago • 3 comments

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|   <head>
    4|     <title><%= title %></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');

rrollins avatar Jan 23 '12 00:01 rrollins

I have the same problem. Any updates?

martinthogersen avatar Jul 06 '12 19:07 martinthogersen

Me too. Any news about that issue?

sebastianwoinar avatar Dec 12 '12 10:12 sebastianwoinar

Any updates on this? Any solution yet? :)

mastix avatar Mar 07 '13 18:03 mastix