Forum: Ruby on Rails Why would @params[:page] >= 2 give an error?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F68e4842b0a5487678e26046fdb2fdf3?d=identicon&s=25 softwareengineer 99 (Guest)
on 2006-02-07 02:59
(Received via mailing list)
Can anyone please guide me as to what is wrong with the following?

      if @params[:page] >= 2
          @title+=@params[:page]
      end

  Thanks
  Frank
119af50160cabfe1fb6f2f05f5018c64?d=identicon&s=25 James Ludlow (Guest)
on 2006-02-07 03:02
(Received via mailing list)
On 2/6/06, softwareengineer 99 <softwareengineer99@yahoo.com> wrote:
> Can anyone please guide me as to what is wrong with the following?
>
>      if @params[:page] >= 2
>          @title+=@params[:page]
>      end

The error you're getting is ... ?
3ccecc71b9fb0a3d7f00a0bef6f0a63a?d=identicon&s=25 Kent Sibilev (Guest)
on 2006-02-07 03:05
(Received via mailing list)
Could it be

if @params[:page].to_i >= 2

Kent
F68e4842b0a5487678e26046fdb2fdf3?d=identicon&s=25 softwareengineer 99 (Guest)
on 2006-02-07 17:39
(Received via mailing list)
Kent,
  This may be the answer. I will test it out

  thanks
  Frank

Kent Sibilev <ksruby@gmail.com> wrote:  Could it be

if @params[:page].to_i >= 2

Kent
This topic is locked and can not be replied to.