Supose I've got 6 children pages, if I write:
it behaves like a pure
showing all 6 pages.
But if I write:
<r:children:each limit="6" offset="3">...</r:childen:each>
it works correctly, showing only the last three.
Is it correct?
I recently ran into this confusing problem too.
Here are the relevant specs:
which test children:each given a limit, or an offset with a limit. But
there is no spec for an offset without a limit. When I saw this, I
tried adding a limit to my children:each tag (which had only an
offset), and reached the same conclusion as Gabriel.
Page.find(:all, :offset => 3) returns all pages.
This is essentially what the children:each does (scoped to a
If this is incorrect behavior, it's with ActiveRecord::Base
As Jim points out, the behaviour is defined at the level of
I wonder if an interim solution might be for the children:each tag to
set a default limit of a very high number (such as 10,000). This way,
you could call:
which would run something like:
Page.find(:all, :offset => 3, :limit => 10000)
and produce the expected effect of returning all pages after the first
3. (As long as you have less than 10000 pages!)
Radiant mailing list