diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index d428a5814..18eb25675 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -100,7 +100,7 @@ class OrganizationsController < ApplicationController @org_activities = OrgActivity.where("container_type = 'Course' and org_act_type = 'Poll' and container_id in (#{course_ids.join(',')})").order('updated_at desc').page(params[:page] || 1).per(10) end end - @page = params[:page] + @page = params[:page] ? params[:page].to_i : 1 respond_to do |format| format.html format.js diff --git a/app/views/organizations/_org_activities.html.erb b/app/views/organizations/_org_activities.html.erb index ef4329c0d..29bfb4e18 100644 --- a/app/views/organizations/_org_activities.html.erb +++ b/app/views/organizations/_org_activities.html.erb @@ -47,7 +47,7 @@
<%= image_tag(url_to_avatar(User.find(act.user_id)), :width => "45", :height => "45") %> - <%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %> + <%= render :partial => 'users/show_detail_info', :locals => {:user => User.find(act.user_id)} %>