Make boolean value database agnostic

pull/1455/head
Hagen Schink 11 years ago
parent c87cf9b7bf
commit 791bb19ca2
  1. 2
      app/models/work_package_custom_field.rb

@ -37,7 +37,7 @@ class WorkPackageCustomField < CustomField
joins("LEFT OUTER JOIN custom_fields_projects AS cfp ON (custom_fields.id = cfp.custom_field_id) " \
"LEFT OUTER JOIN projects AS p ON (cfp.project_id = p.id) " \
"LEFT OUTER JOIN members AS m ON (p.id = m.project_id)")
.where("custom_fields.is_for_all = 1 OR m.user_id = ?", user.id)
.where("custom_fields.is_for_all = #{ActiveRecord::Base.connection.quoted_true} OR m.user_id = ?", user.id)
end
}

Loading…
Cancel
Save