diff --git a/app/helpers/admin/personal_conferences_helper.rb b/app/helpers/admin/personal_conferences_helper.rb index 8589a7c..487a73a 100644 --- a/app/helpers/admin/personal_conferences_helper.rb +++ b/app/helpers/admin/personal_conferences_helper.rb @@ -129,20 +129,21 @@ module Admin::PersonalConferencesHelper conference.member_profile = mp conference.save end - def get_data_for_excel(year_start,year_end) - data = [] - roles = Role.where(:disabled => false, :title.ne => "", :title.ne => nil).asc(:key) - roles.each do |role| - d = {} - d["name"] = role.title - mps = role.member_profile_ids - d1 = DateTime.new(year_start,1,1,0,0) - d2 = DateTime.new(year_end,12,31,23,59) - d["data"] = WritingConference.where(:publication_date.gte => d1, :publication_date.lte => d2, :member_profile_id.in => mps) rescue [] - data << d - end - return data - end + + def get_data_for_excel(year_start,year_end) + data = [] + roles = Role.where(:disabled => false, :title.ne => "", :title.ne => nil).asc(:key) + roles.each do |role| + d = {} + d["name"] = role.title + mps = role.member_profile_ids + d1 = DateTime.new(year_start,1,1,0,0) + d2 = DateTime.new(year_end,12,31,23,59) + d["data"] = WritingConference.where(:publication_date.gte => d1, :publication_date.lte => d2, :member_profile_id.in => mps) rescue [] + data << d + end + return data + end def get_chart_data(year_start,year_end,role,type) case type