Re: [Rails] myModel.all returns only 138 records

2013-07-06 Thread Colin Law
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

Re: [Rails] myModel.all returns only 138 records

2013-07-06 Thread Geoffroy Gomet
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

Re: [Rails] myModel.all returns only 138 records

2013-07-05 Thread Colin Law
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

[Rails] myModel.all returns only 138 records

2013-07-05 Thread zip py
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