On 6 July 2013 11:15, Geoffroy Gomet wrote:
> Hi,
>
> As of Rails 4, the order is by default based on the id DESC.
> So Model.last produces the following sql:
>
> SELECT * FROM models ORDER BY models.id DESC LIMIT 1
>
>
> That said, I've no idea why you only get a part of the records back.
It is
Hi,
As of Rails 4, the order is by default based on the id DESC.
So Model.last produces the following sql:
*SELECT * FROM models ORDER BY models.id DESC LIMIT 1*
That said, I've no idea why you only get a part of the records back.
Were you able to validates all those numbers directly on the DB
On 5 July 2013 18:06, zip py wrote:
> Hi
>
> I have a Rail 4 with Postrgesql 9.1 setup that is working fine, apart
> from I just ran into an issue.
>
> Lets say I have a model called MyModel that has 150 records.
>
> If in IRB I try:
>
>> test = MyModel.all
>
> Only 138 records are returned.
How
Hi
I have a Rail 4 with Postrgesql 9.1 setup that is working fine, apart
from I just ran into an issue.
Lets say I have a model called MyModel that has 150 records.
If in IRB I try:
> test = MyModel.all
Only 138 records are returned.
If I now try:
> lastRecord = test.last
The record I get h
4 matches
Mail list logo