Visiting the url:
Does not execute the action ‘session’
For some odd reason (that I’d like to discover), rails is not executing
my ‘session’ action. If i get rid of the sessions.rhtml file in the
views dir, then webrick just hangs and never returns from the request.
I can go and visit other pages in the app but not that one.
Here is the controller class:
class SchedulesController < ApplicationController
# semester list
@semester = Session.find( :all, :conditions => “season_id != 0” )
# list of sessions
@sessions = Session.find( :all,
:conditions => "season_id = " + params[:season] + " and year = " +
# list of classes
#@classes = AClass.find( :all, :conditions => "session_id = " +
#@classes = AClass.find( :all, :conditions => “session_id = 3” )
@c = “hi”
logger.info( @c )
# class information
@c = “hi”
And here is the view:
<%= @c.class %>
For the current code, @c.class print NilClass
logger.info( @c ) is never executed either as i do not see any output
(‘hi’) in the log file.
What could be blocking the session action from executing? I created a
test rails app with one controller with one action (session) and it
worked fine. I have a database with a table called sessions. I have a
model called Session stored in session.rb in the models dir. I’ve tried
removing the model file and restarting webrick with no results.
Any help would be greatly appreciated. I’ve been playing with this for