diff --git a/app/controllers/admin/honors_controller.rb b/app/controllers/admin/honors_controller.rb index 031ab31..6469075 100644 --- a/app/controllers/admin/honors_controller.rb +++ b/app/controllers/admin/honors_controller.rb @@ -14,7 +14,7 @@ class Admin::HonorsController < OrbitMemberController end def new - @member = MemberProfile.find_by(:uid=>params['uid']) rescue nil + @member = MemberProfile.find_by(:uid=>params['uid'].to_s) rescue nil @honor = Honor.new if params[:desktop] @@ -162,7 +162,7 @@ class Admin::HonorsController < OrbitMemberController end def frontend_setting - @member = MemberProfile.find_by(:uid=>params['uid']) rescue nil + @member = MemberProfile.find_by(:uid=>params['uid'].to_s) rescue nil @intro = HonorIntro.find_by(:member_profile_id=>@member.id) rescue nil @intro = @intro.nil? ? HonorIntro.new({:member_profile_id=>@member.id}) : @intro end diff --git a/app/controllers/personal_honors_controller.rb b/app/controllers/personal_honors_controller.rb index d50abd5..0906480 100644 --- a/app/controllers/personal_honors_controller.rb +++ b/app/controllers/personal_honors_controller.rb @@ -73,7 +73,7 @@ class PersonalHonorsController < ApplicationController def show params = OrbitHelper.params - plugin = Honor.where(:is_hidden=>false).find_by(uid: params[:uid]) + plugin = Honor.where(:is_hidden=>false).find_by(uid: params[:uid].to_s) fields_to_show = [ "year", "honor_type",