Hi,
I’m submitting a form to “/login”. Here’s my config/routes.rb file:
=======start routes.rb file===================
ActionController::Routing::Routes.draw do |map|
map.signup ‘/signup’, :controller => ‘users’, :action => ‘new’
map.login ‘/login’, :controller => ‘session’, :action => ‘new’
map.logout ‘/logout’, :controller => ‘session’, :action => ‘destroy’
map.resource :user
map.resource :session
map.connect ‘’, :controller => “register”, :action => “start”
The priority is based upon order of creation: first created ->
highest priority.
Sample of regular route:
map.connect ‘products/:id’, :controller => ‘catalog’, :action =>
‘view’
Keep in mind you can assign values other than :controller
and :action
Sample of named route:
map.purchase ‘products/:id/purchase’, :controller =>
‘catalog’, :action => ‘purchase’
This route can be invoked with purchase_url(:id => product.id)
You can have the root of your site routed by hooking up ‘’
– just remember to delete public/index.html.
map.connect ‘’, :controller => “welcome”
Allow downloading Web Service WSDL as a file with an extension
instead of a file named ‘wsdl’
map.connect ‘:controller/service.wsdl’, :action => ‘wsdl’
Install the default route as the lowest priority.
map.connect ‘:controller/:action/:id.:format’
map.connect ‘:controller/:action/:id’
end
=======================end routes.rb file==================
but I’m getting this error:
Unknown action
No action responded to show
Any ideas? Here’s the relevant code from my session_controller.rb
file:
class SessionController < ApplicationController
Be sure to include AuthenticationSystem in Application Controller
instead
include AuthenticatedSystem
render new.rhtml
def new
redirect_to :action => ‘create’
end
def create
self.current_user = User.authenticate(params[:login],
params[:password])
if logged_in?
if params[:remember_me] == “1”
self.current_user.remember_me
cookies[:auth_token] = { :value =>
self.current_user.remember_token , :expires =>
self.current_user.remember_token_expires_at }
end
# The next two lines were added 1/24/08
@user = User.find(:first, :conditions => [“login = ?”,
params[:login]])
session[:user_id] = @user.id
render :controller => ‘order’, :action => ‘start’
flash[:notice] = “Logged in successfully”
else
render :controller => ‘register’, :action => ‘start’
end
end
Thanks for help, - Dave