update query for Postgresql

exchanging double quote with single quote in sql. Thanks Walter
This commit is contained in:
Reinier Balt 2008-10-28 22:39:50 +01:00
parent 841eb1cb76
commit e31b05a697

View file

@ -53,8 +53,8 @@ class User < ActiveRecord::Base
end
def actionize(user_id, scope_conditions = {})
@state = scope_conditions[:state]
query_state = ''
query_state = 'AND project.state = "' + @state +'" 'if @state
query_state = ""
query_state = "AND project.state = '" + @state +"' "if @state
projects = Project.find_by_sql([
"SELECT project.id, count(todo.id) as p_count " +
"FROM projects as project " +