RE: Re: RC5 Mysql Troubles

I have username and password. Same error. Haven’t changed anything
after upgrading to RC5. Database error started after upgrading.

I have the following code snippet and I don’t understand why the
logger.info “Datestr” line is always logging to the log file before the
“Scope 2.1” line when it clearly succeeds, not precedes “Scope 2.1” in
the code. Shouldn’t this code always produce a Datestr when given an
empty params[:scope]??

And how is it even freakin possible that I get an empty @datestr when I
assign it if both clauses of an if → else → end statement?

def noway
@scope = “empty”
logger.info “Scope 1: #@scope

    if params[:scope]
        @scope = params[:scope]
        logger.info "Scope 2.2: #@scope"
    else
        @scope = "last three days"
        logger.info "Scope 2.1: #@scope"
    end if

    if @scope == "last three days"
        @datestr = (Date.today - 3).strftime("%Y/%m/%d")
    else
        @datestr = "empty"
    end if

    logger.info "Datestr: #@datestr"
    render :text => 'hello'
end

Development.log

Processing DashboardController#noway (for 10.6.15.149 at 2005-12-09
15:37:35) [GET]
Parameters: {“action”=>“noway”, “controller”=>“dashboard”}
Scope 1: empty
Datestr:
Scope 2.1: last three days
Completed in 0.01600 (62 reqs/sec) | Rendering: 0.00000 (0%) | DB:
0.00000 (0%) | 200 OK [http://matterhorn/serveradm/dashboard/noway]