From: khaines@... Date: 2006-08-28T23:36:48+09:00 Subject: Re: Newbie : assign a value to a variable... On Mon, 28 Aug 2006, Nicolas Blanco wrote: > I tried : > per_page = @params[:per_page].to_i > 0 ? @params[:per_page] : 20 > > but in this case if @params[:per_page] = 'blahblah' it works, I get 20 > in per_page but if @params[:per_page] = 6 or another integer I get : > undefined method `>' for false:FalseClass > > from Rails... ??? Can someone tell me what horrible thing Rails is doing to the language, there? How is @params[:per_page].to_i becoming false? Kirk Haines