On Aug 10, 9:50 pm, Kayne <[email protected]> wrote:
> Ok, I make like this:
>
> @pages, specs = Spec.paginate :specs,
> :page => 30,
> :order => 'last_name, first_name',
> :conditions => ["last_name like ?", @initial+'%']
>
> And when I want to execute this code. browser gives me back:
>
Look at the will_paginate docs a little more closely. The paginate
method returns a single object and (unlike the old paginate) you don't
pass it an argument to tell it what to paginate. That error message
doesn't look like something that will_paginate would raise though.
Fred
> Couldn't find Spec with ID=1 AND (last_name like 'B%')
>
> I don't know, what exactly it's saying... I just want to paginate rows
> from model Spec (which one is belongs_to :user), to show users from
> databases. In Spec model I've got first_name and last_name and by
> ActiveRecord this is belong to User model.
>
> But now I've got problem - how it show by will_paginate?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---