动态查询sql错误

This commit is contained in:
ouyangxuhua 2015-11-13 19:46:04 +08:00
parent dfd1e98d00
commit a5a413eda0
1 changed files with 3 additions and 2 deletions

View File

@ -27,8 +27,9 @@ class OrganizationsController < ApplicationController
def show
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
@organization = Organization.find(params[:id])
@activities = OrgActivity.where('(org_act_id = ? and org_act_type = ?) || (container_id =? and org_act_type =? and org_act_id !=?)',
@organization.id, 'CreateOrganization ', @organization.id, 'OrgDocumentComment', @organization.home_id).order('updated_at desc')
@activities = OrgActivity.where('container_id =? and container_type =? ',
@organization.id, 'Organization ').order('updated_at desc')
@activities = paginateHelper @activities, 10
else
render_403