动态查询sql错误

ke_guange
ouyangxuhua 10 years ago
parent dfd1e98d00
commit a5a413eda0

@ -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

Loading…
Cancel
Save