Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Routing Problem in RailwayJS
$ rw routes
users GET /users.:format? users#index
users POST /users.:format? users#create
new_user GET /users/new.:format? users#new
edit_user GET /users/:id/edit.:format? users#edit
user DELETE /users/:id.:format? users#destroy
user PUT /users/:id.:format? users#update
user GET /users/:id.:format? users#show
login GET /login users#login
login POST /login users#authenticate
<!DOCTYPE html>
<html lang="en">
<title><%= title %></title>
<%- stylesheet_link_tag( 'style') %>
<form action='/login' method='post' id='login'>
<img src='images/logo.png'>
<input type='text' name='login' id='username' required autofocus>
<input type='password' name='password' id='password'>
<input type='submit' class='button' value='Login'>
exports.routes = function (map) {
//custom routes here
map.get('login', 'users#login');'login', 'users#authenticate');
//users_controller.js (omitted out the CRUD actions)
action(function login() {
console.log("in login-------");
this.title= "Login Page";
action(function authenticate() {
// this never shows up when the form is posted.
console.log("in authenticate");

This comment has been minimized.

Show comment Hide comment

anatoliychakkaev Sep 4, 2012

Could you please show your config/environment.js

Could you please show your config/environment.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment