twg/comfortable-mexican-sofa — Issue #115: Issue running on Postgresql (Heroku)
Author: drewmca
Created: 2011-12-20 08:42:47+00:00
State: open

Heroku is throwing an error when trying to list pages for a site. Specifically, it looks like it's running into the error with Postgresql being less forgiving with typecasts when setting parameters on queries. See here for more info ("operator does not exist").

http://devcenter.heroku.com/articles/database

As far as I can tell, the problem is caused by the "is_categorized" extension, which uses this syntax:

```ruby
if (categories = [categories].flatten.compact).present?
select("DISTINCT #{table_name}.*").
joins(:categorizations => :category).
where('cms_categories.label' => categories)
end

```

I'lll try it tomorrow morning using the "?" syntax for interpolation and see if it fixes it on a fork. If so I'll issue a pull request. Thoughts on it in the meantime? Could this be happening elsewhere?