Re: Project.where(:status = true)

2010-06-17 Thread Jesús Navarrete
with our Projects controller. Where we want to select all the projects with status set to true we use: p = Project.where(:status = true) It works locally, but it doesn't work on the Heroku instance. Does work, but not agnostic p = Project.where(:status = '1') What's the best

Re: Project.where(:status = true)

2010-06-17 Thread Hemal Kuntawala
was that status was defined as text in the migration file. * ouch * On Jun 16, 3:46 pm, webdevotion webdevot...@gmail.com wrote: Hey We have a problem with our Projects controller. Where we want to select all the projects with status set to true we use: p = Project.where(:status = true

Project.where(:status = true)

2010-06-16 Thread webdevotion
Hey We have a problem with our Projects controller. Where we want to select all the projects with status set to true we use: p = Project.where(:status = true) It works locally, but it doesn't work on the Heroku instance. Does work, but not agnostic p = Project.where(:status = '1') What's

Re: Project.where(:status = true)

2010-06-16 Thread Ben Lovell
On 16 June 2010 14:46, webdevotion webdevot...@gmail.com wrote: Hey We have a problem with our Projects controller. Where we want to select all the projects with status set to true we use: p = Project.where(:status = true) It works locally, but it doesn't work on the Heroku instance

Re: Project.where(:status = true)

2010-06-16 Thread Hemal Kuntawala
(:status = true) It works locally, but it doesn't work on the Heroku instance. Does work, but not agnostic p = Project.where(:status = '1') What's the best practice to solve this ( little ) problem? -- You received this message because you are subscribed to the Google Groups Heroku group

Re: Project.where(:status = true)

2010-06-16 Thread webdevotion
Are you running postgresql locally? no, sqlite for local development machines -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to

Re: Project.where(:status = true)

2010-06-16 Thread webdevotion
They said something about problems with casting a boolean to an integer or something along those lines. The problem is / was that the postrgresql db from heroku doesn't like the native ruby boolean value used in our projects#index action. On Jun 16, 4:05 pm, Hemal Kuntawala

Re: Project.where(:status = true)

2010-06-16 Thread Steve Smith
Looks like Arel might not be escaping the true correctly which is strange. How about p = Project.where([status = ?, true]) Does that do the same thing? Steve On 16 Jun 2010, at 14:46, webdevotion wrote: Hey We have a problem with our Projects controller. Where we want to select all

Re: Project.where(:status = true)

2010-06-16 Thread webdevotion
Hey Steve, This is the output from your suggested snippet: heroku console Ruby console for weekendr.heroku.com p = Project.where([status = ?, true]) = [] On Jun 16, 4:22 pm, Steve Smith st...@scsworld.co.uk wrote: Looks like Arel might not be escaping the true correctly which is strange

Re: Project.where(:status = true)

2010-06-16 Thread webdevotion
use: p = Project.where(:status = true) It works locally, but it doesn't work on the Heroku instance. Does work, but not agnostic p = Project.where(:status = '1') What's the best practice to solve this ( little ) problem? -- You received this message because you are subscribed

Re: Project.where(:status = true)

2010-06-16 Thread Keenan Brock
= ?, true]) Does that do the same thing? Steve On 16 Jun 2010, at 14:46, webdevotion wrote: Hey We have a problem with our Projects controller. Where we want to select all the projects with status set to true we use: p = Project.where(:status = true) It works locally

Re: Project.where(:status = true)

2010-06-16 Thread Neil Middleton
Are you using Postgres locally? Is it a INT type in the DB? On Wed, Jun 16, 2010 at 2:46 PM, webdevotion webdevot...@gmail.com wrote: Hey We have a problem with our Projects controller. Where we want to select all the projects with status set to true we use: p = Project.where(:status

Re: Project.where(:status = true)

2010-06-16 Thread Neil Middleton
with our Projects controller. Where we want to select all the projects with status set to true we use: p = Project.where(:status = true) It works locally, but it doesn't work on the Heroku instance. Does work, but not agnostic p = Project.where(:status = '1') What's the best practice