diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index e41e2a43..46be2ef4 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -359,7 +359,7 @@ class AttachmentsController < ApplicationController saved = @attachment.save respond_to do |format| format.js - format.json { render json: { attachment_id: @attachment.id, url: download_attachment_path(@attachment.id) } } + format.json { render json: { attachment_id: @attachment.id, url: "/api/attachments/#{@attachment.id}"} } format.api { if saved render :action => 'upload', :status => :created @@ -380,7 +380,7 @@ class AttachmentsController < ApplicationController render json: { success: saved ? 1 : 0, # | 1, // 0 表示上传失败,1 表示上传成功 message: "上传信息:#{ @attachment.errors.full_messages.join(',') }", - url: download_attachment_path(@attachment.id), # 上传成功时才返回 + url: "/api/attachments/#{@attachment.id}", # 上传成功时才返回 attachment_id: @attachment.id } end @@ -413,7 +413,7 @@ class AttachmentsController < ApplicationController render json: { success: saved ? 1 : 0, # | 1, // 0 表示上传失败,1 表示上传成功 message: "上传失败:#{ @attachment.errors.full_messages.join(',') }", - url: download_attachment_path(@attachment.id) # 上传成功时才返回 + url: "/api/attachments/#{@attachment.id}" # 上传成功时才返回 } end diff --git a/app/controllers/colleges_controller.rb b/app/controllers/colleges_controller.rb index 4bc6cd87..15f9ef8f 100644 --- a/app/controllers/colleges_controller.rb +++ b/app/controllers/colleges_controller.rb @@ -67,12 +67,12 @@ class CollegesController < ApplicationController user_extensions.`school_id`=#{@school.id}) and work_status between 1 and 2 and myshixun_id !=0").first.try(:sw_count) @teachers = User.find_by_sql("SELECT users.id, users.login, users.lastname, users.firstname, users.nickname, IFNULL((SELECT count(shixuns.id) FROM shixuns where shixuns.user_id =users.id group by shixuns.user_id), 0) AS publish_shixun_count, - (SELECT count(c.id) FROM courses c, members m, member_roles mr WHERE c.id != 1309 and m.course_id = c.id AND m.id=mr.member_id AND mr.role_id in (3,7,9) and c.school_id = #{@school.id} AND m.user_id=users.id AND c.is_delete = 0) as course_count + (SELECT count(c.id) FROM courses c, course_members m WHERE c.id != 1309 and m.course_id = c.id AND m.role in (1,2,3) and c.school_id = #{@school.id} AND m.user_id=users.id AND c.is_delete = 0) as course_count FROM `users`, user_extensions ue where users.id=ue.user_id and ue.identity=0 and ue.school_id=#{@school.id} ORDER BY publish_shixun_count desc, course_count desc, id desc LIMIT 10") # ).order("publish_shixun_count desc, experience desc").limit(10) @teachers = @teachers.map do |teacher| - course_ids = Course.find_by_sql("SELECT c.id FROM courses c, members m, member_roles mr WHERE c.id != 1309 and m.course_id = c.id AND m.id=mr.member_id AND mr.role_id in (3,7,9) AND m.user_id=#{teacher.id} AND c.is_delete = 0 and c.school_id = #{@school.id}") + course_ids = Course.find_by_sql("SELECT c.id FROM courses c, course_members m WHERE c.id != 1309 and m.course_id = c.id AND m.role in (1,2,3) AND m.user_id=#{teacher.id} AND c.is_delete = 0 and c.school_id = #{@school.id}") course_count = course_ids.size homeworks = HomeworkCommon.where(:homework_type => 4, :course_id => course_ids.map(&:id)) un_shixun_work_count = homeworks.where("publish_time > '#{Time.now}' or publish_time is null").count diff --git a/app/controllers/competition_teams_controller.rb b/app/controllers/competition_teams_controller.rb index c285fba7..2bbbd6ef 100644 --- a/app/controllers/competition_teams_controller.rb +++ b/app/controllers/competition_teams_controller.rb @@ -32,9 +32,8 @@ class CompetitionTeamsController < ApplicationController # todo:使用新版course_members course_ids = Course.where('courses.created_at > ?', Time.parse('2018-06-01')) - .joins('join members on members.course_id = courses.id') - .joins('join member_roles on member_roles.member_id = members.id and member_roles.role_id in (3,7,9)') - .where(members: { user_id: @team_user_ids }).pluck(:id) + .joins('join course_members on course_members.course_id = courses.id and course_members.role in (1,2,3)') + .where(course_members: { user_id: @team_user_ids }).pluck(:id) courses = Course.where(id: course_ids).joins(:shixun_homework_commons).where('homework_commons.publish_time < now()') @courses = courses.select('courses.id, courses.name, courses.members_count, count(*) shixun_homework_count') .group('courses.id').order('shixun_homework_count desc').having('shixun_homework_count > 0') diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index b830776b..19bf3039 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -87,7 +87,7 @@ class CoursesController < ApplicationController course_ids = course_ids.present? ? course_ids.join(",") : -1 @courses = Course.where("courses.is_delete = 0 and courses.is_hidden = 0 #{course_ids == -1 ? "" : "and courses.id in (#{course_ids})"}").select("courses.id, courses.tea_id, courses.name, courses.is_public, courses.members_count, courses.homework_commons_count,(SELECT MAX(created_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("courses.id = 1309 desc, a desc") elsif @order == "mine" - my_course_ids = Course.find_by_sql("SELECT c.id FROM courses c, members m, member_roles mr WHERE m.course_id = c.id AND m.id=mr.member_id AND mr.role_id in (3,7,9,10) AND m.user_id=#{@user.id} AND c.is_delete = 0") + my_course_ids = Course.find_by_sql("SELECT c.id FROM courses c, course_members m WHERE m.course_id = c.id AND m.role in (1,2,3,4) AND m.user_id=#{@user.id} AND c.is_delete = 0") course_ids = course_ids.present? ? my_course_ids.map(&:id) & course_ids : my_course_ids.map(&:id) course_ids = course_ids.size > 0 ? course_ids.join(",") : "-1" @courses = Course.find_by_sql("select c.id, c.tea_id, c.name, c.is_public, c.members_count, c.homework_commons_count, u.login, u.nickname, u.lastname, u.firstname, u.show_realname, ue.school_id from courses c, users u, user_extensions ue where c.tea_id = u.id and u.id = ue.user_id and c.is_delete = 0 and c.is_hidden = 0 and c.id in (#{course_ids}) order by c.id = 1309 desc, #{order_str} desc") @@ -894,7 +894,7 @@ class CoursesController < ApplicationController # @teacher_count = TeacherAndAssistantCount @course if @course.try(:id) != 1309 || User.current.admin? || User.current.try(:id) == 15582 - @teacher_count = @course.members.includes(:roles, :user).where("roles.id" => [3,7,9]).count + @teacher_count = @course.course_members.includes(:roles, :user).where("roles.id" => [3,7,9]).count else @teacher_count = @course.members.includes(:roles, :user).where("roles.id" => [3,7]).count end diff --git a/app/controllers/libraries_controller.rb b/app/controllers/libraries_controller.rb index b7bbf836..ac861841 100644 --- a/app/controllers/libraries_controller.rb +++ b/app/controllers/libraries_controller.rb @@ -23,7 +23,7 @@ class LibrariesController < ApplicationController per_page = params[:per_page].to_i <= 0 ? 20 : params[:per_page].to_i @libraries = paginateHelper libraries.includes(:library_tags, :praise_tread_cache, user: :user_extensions), per_page - @download_count_map = Attachment.where(container_type: 'Library', container_id: @libraries.map(&:id)).group(:container_id).count + @download_count_map = Attachment.where(container_type: 'Library', container_id: @libraries.map(&:id)).group(:container_id).sum(:downloads) end def show diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 156ae951..98b58614 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -1133,6 +1133,12 @@ end render :json => {:status => 1} end + def update_competition_text + text = CompetitionTextConfig.find(params[:id]) + text.update_attributes(name: params[:name], description: params[:description]) + render :json => {:status => 1} + end + def delete_competition_text ctc = CompetitionTextConfig.find params[:id] ctc.destroy @@ -2944,20 +2950,20 @@ end course_group = CourseGroup.where(:course_id => course.id, :name => group_name).first || CourseGroup.create(:name => group_name, :course_id => course.id) if group_name - member = course.members.where(:user_id => user.id).first + member = course.course_members.where(:user_id => user.id, :role => 4).first # 如果已是课堂成员且是学生身份and不在指定的分班则移动到该分班 - if member.present? && member.member_roles.pluck(:role_id).include?(10) && member.course_group_id != course_group.try(:id).to_i + if member.present? && member.course_group_id != course_group.try(:id).to_i member.update_column("course_group_id", course_group.try(:id).to_i) member_count += 1 elsif !member.present? - member = Member.new(:role_ids => [member_role], :user_id => user.id) - if member_role == 10 - StudentsForCourse.create(:student_id => user.id, :course_id => course.id) - end + member = CourseMember.new(:role => 4, :user_id => user.id) + # if member_role == 10 + # StudentsForCourse.create(:student_id => user.id, :course_id => course.id) + # end Tiding.create(:user_id => user.id, :trigger_user_id => course.tea_id, :container_id => course.id, :container_type => 'TeacherJoinCourse', :belong_container_id => course.id, :belong_container_type => "Course", :tiding_type => "System", :extra => member_role) member.course_group_id = course_group.try(:id).to_i - course.members << member + course.course_members << member member_count += 1 end @@ -4262,7 +4268,7 @@ end teacher_name = course.teacher ? course.teacher.show_real_name : "" sheet1[count_row,0] = course.id sheet1[count_row,1] = course.name - sheet1[count_row,2] = course.members.count + sheet1[count_row,2] = course.course_members_count sheet1[count_row,3] = course.attachments.count sheet1[count_row,4] = course.homework_commons.where(:homework_type => 1).count sheet1[count_row,5] = course.homework_commons.where(:homework_type => 4).count diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 744b1d1f..61f05495 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -360,6 +360,13 @@ class UsersController < ApplicationController @messages = PrivateMessage.find_by_sql("SELECT ui.* FROM (SELECT * FROM private_messages WHERE STATUS != 2 AND user_id = #{@user.id} ORDER BY id DESC) ui GROUP BY ui.target_id ORDER BY ui.send_time DESC") end + def join_private_courses + @invitation_code = params[:invitation_code] + respond_to do |format| + format.js + end + end + # 我收到的issue def user_receive_issues @receive_issues = "我收到的Issue" @@ -2438,14 +2445,14 @@ class UsersController < ApplicationController case @type when "a_course" student_course_ids = Course.find_by_sql("SELECT c.id FROM courses c, students_for_courses sfc WHERE sfc.course_id = c.id AND sfc.student_id=#{@user.id} AND c.is_delete = 0 AND c.is_end in #{status}") - manage_course_ids = Course.find_by_sql("SELECT c.id FROM courses c, members m, member_roles mr WHERE m.course_id = c.id AND m.id=mr.member_id AND mr.role_id in (3,7,9) AND m.user_id=#{@user.id} AND c.is_delete = 0 AND c.is_end in #{status}") + manage_course_ids = Course.find_by_sql("SELECT c.id FROM courses c, course_members m WHERE m.course_id = c.id AND m.role in (1,2,3) AND m.user_id=#{@user.id} AND c.is_delete = 0 AND c.is_end in #{status}") course_ids = student_course_ids.map(&:id) + manage_course_ids.map(&:id) @objects = Course.where(:id => course_ids.uniq).includes(:attachments, :teacher => [:user_extensions => [:school]]).order("updated_at #{order}") when "l_course" - student_course_ids = Course.find_by_sql("SELECT c.id FROM courses c, students_for_courses sfc WHERE sfc.course_id = c.id AND sfc.student_id=#{@user.id} AND c.is_delete = 0 AND c.is_end in #{status}") + student_course_ids = Course.find_by_sql("SELECT c.id FROM courses c, course_members m WHERE m.course_id = c.id and m.role = 4 AND m.user_id=#{@user.id} AND c.is_delete = 0 AND c.is_end in #{status}") @objects = Course.where(:id => student_course_ids.map(&:id)).includes(:attachments, :teacher => [:user_extensions => [:school]]).order("updated_at #{order}") when "p_course" - course_ids = Course.find_by_sql("SELECT c.id FROM courses c, members m, member_roles mr WHERE m.course_id = c.id AND m.id=mr.member_id AND mr.role_id in (3,7,9) AND m.user_id=#{@user.id} AND c.is_delete = 0 AND c.is_end in #{status}") + course_ids = Course.find_by_sql("SELECT c.id FROM courses c, course_members m WHERE m.course_id = c.id AND m.role in (1,2,3) AND m.user_id=#{@user.id} AND c.is_delete = 0 AND c.is_end in #{status}") @objects = Course.where(:id => course_ids.map(&:id)).includes(:attachments, :teacher => [:user_extensions => [:school]]).order("id = 1309 desc, updated_at #{order}") when "a_shixun" shixun_ids = @user.shixun_members.map(&:shixun_id) + @user.myshixuns.map(&:shixun_id) diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index c0abee20..251e6de7 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -42,7 +42,7 @@ class WelcomeController < ApplicationController # 运营引流个人数据展示 def user_agents - @user_agents = UserAgent.where(key: params[:edu]).includes(:user_actionss) + @user_agents = UserAgent.where(key: params[:edu]) @agents_count = @user_agents.count limit = 20 @agents_pages = Paginator.new @agents_count, limit, params['page'] || 1 @@ -54,6 +54,12 @@ class WelcomeController < ApplicationController end end + def join_private_courses + @invitation_code = params[:invitation_code] + respond_to do |format| + format.js + end + end def shixun_to_local identifiers = params[:identifiers].split(",") diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 39298061..aac2a843 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -5690,7 +5690,8 @@ end def download_named_attachment_url_without_domain(id, filename, option={}) attachment_id = (Attachment === id ? id.id : id) - Setting.protocol + "://" + Setting.host_name + "/attachments/download/" + attachment_id.to_s + "/" + filename + # Setting.protocol + "://" + Setting.host_name + "/attachments/download/" + attachment_id.to_s + "/" + filename + "/api/attachments/" + attachment_id.to_s end def named_attachment_url_without_domain(id, filename, option={}) diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb index 395bb07a..44cfb760 100644 --- a/app/helpers/welcome_helper.rb +++ b/app/helpers/welcome_helper.rb @@ -24,22 +24,41 @@ module WelcomeHelper # 引流注册情况 def register_info user_agent - if user_agent.agent_type.to_i == UserAgent::USER_AD - user_id = user_agent.user_actionss.first.try(:user_id) - if user_id && User.where("id = #{user_id} and created_on < '2019-07-15 00:00:00'").present? - "代理前注册" - else - "未转换" - end - elsif user_agent.agent_type.to_i == UserAgent::USER_REGISTER || UserActions.find_by_ip(user_agent.ip) - "代理后注册" - else - user_id = user_agent.user_actionss.first.try(:user_id) - if user_id && User.where("id = #{user_id} and created_on < '2019-07-15 00:00:00'").present? - "代理前注册" - else - "代理后注册" - end + case user_agent.register_status + when 0 + "IP未登录" + when 1 + "代理之前注册" + when 2 + "代理之后注册" + end + # if user_agent.agent_type.to_i == UserAgent::USER_AD + # user_id = user_agent.user_actionss.first.try(:user_id) + # if user_id && User.where("id = #{user_id} and created_on < '2019-07-15 00:00:00'").present? + # "代理前注册" + # else + # "未转换" + # end + # elsif user_agent.agent_type.to_i == UserAgent::USER_REGISTER || UserActions.find_by_ip(user_agent.ip) + # "代理后注册" + # else + # user_id = user_agent.user_actionss.first.try(:user_id) + # if user_id && User.where("id = #{user_id} and created_on < '2019-07-15 00:00:00'").present? + # "代理前注册" + # else + # "代理后注册" + # end + # end + end + + def competion_info user_agent + case user_agent.action_status + when 0 + "未报名" + when 1 + "代理之前报名" + when 2 + "代理之后报名" end end diff --git a/app/models/competition_text_config.rb b/app/models/competition_text_config.rb index 25ddb28e..436818bf 100644 --- a/app/models/competition_text_config.rb +++ b/app/models/competition_text_config.rb @@ -1,4 +1,4 @@ class CompetitionTextConfig < ActiveRecord::Base - # attr_accessible :title, :body + attr_accessible :name, :description, :competition_id belongs_to :competition end diff --git a/app/models/course.rb b/app/models/course.rb index c6c6d3df..5068e38e 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -33,6 +33,8 @@ class Course < ActiveRecord::Base belongs_to :syllabus belongs_to :course_list # has_many :bid + has_many :course_members, dependent: :destroy + has_many :members, :include => [:principal, :roles], :conditions => "#{Principal.table_name}.type='User' AND #{Principal.table_name}.status=#{Principal::STATUS_ACTIVE}" has_many :memberships, :class_name => 'Member' has_many :member_principals, :class_name => 'Member', @@ -290,12 +292,16 @@ class Course < ActiveRecord::Base # 课堂的老师不包括助教 def course_teachers - self.members.select{|m| m.roles.to_s.include?("Manager") || m.roles.to_s.include?("Teacher")} + self.course_members.where(:role => [1, 2]) end # 课堂的老师包括助教 def teachers - self.members.includes(:roles).where("roles.id" => [3,7,9]) + self.course_members.where(:role => [1, 2, 3]) + end + + def students + self.course_members.where(:role => [4]) end def self.visible_condition(user, options={}) diff --git a/app/models/course_group.rb b/app/models/course_group.rb index 9c80c85a..c5b66d87 100644 --- a/app/models/course_group.rb +++ b/app/models/course_group.rb @@ -1,6 +1,7 @@ class CourseGroup < ActiveRecord::Base # attr_accessible :title, :body belongs_to :course + has_many :course_members has_many :members has_many :memberships, :class_name => 'Member' has_many :member_principals, :class_name => 'Member', diff --git a/app/models/course_member.rb b/app/models/course_member.rb new file mode 100644 index 00000000..8de272a4 --- /dev/null +++ b/app/models/course_member.rb @@ -0,0 +1,7 @@ +class CourseMember < ActiveRecord::Base + # attr_accessible :title, :body + + belongs_to :course, counter_cache: true + belongs_to :user + belongs_to :course_group, counter_cache: true +end diff --git a/app/models/message.rb b/app/models/message.rb index 392bab48..9e516acb 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -54,6 +54,7 @@ class Message < ActiveRecord::Base belongs_to :reply, :class_name => 'Message', :foreign_key => 'reply_id' #has_one :message_detail, :dependent => :destroy + has_one :message_detail, dependent: :destroy #转发表 has_many :forwards, :as => :from, :dependent => :destroy @@ -102,7 +103,7 @@ class Message < ActiveRecord::Base } - safe_attributes 'subject', 'content', 'reply_id', 'root_id', 'visits' + safe_attributes 'subject', 'reply_id', 'root_id', 'visits' safe_attributes 'board_id','locked', 'sticky', :if => lambda {|message, user| if message.project @@ -115,7 +116,7 @@ class Message < ActiveRecord::Base } def description - self.content + message_detail.try(:content) end # def content diff --git a/app/models/message_detail.rb b/app/models/message_detail.rb new file mode 100644 index 00000000..a12a2b8f --- /dev/null +++ b/app/models/message_detail.rb @@ -0,0 +1,4 @@ +class MessageDetail < ActiveRecord::Base + # attr_accessible :title, :body + belongs_to :message, :touch => true +end diff --git a/app/models/tiding.rb b/app/models/tiding.rb index 177946d8..0cc335a5 100644 --- a/app/models/tiding.rb +++ b/app/models/tiding.rb @@ -254,7 +254,7 @@ class Tiding < ActiveRecord::Base elsif self.tiding_type == "Comment" container.present? ? ("评论了你" + (container.parent.present? ? "的回复:" : "发布的项目issue:") + message_content(container.notes)) : "" else - "更新了Issue:#{container.issue.subject}" + "更新了Issue:#{container.try(:issue).try(:subject)}" end when 'Issue' "指派了Issue给你:" + container.subject diff --git a/app/models/user.rb b/app/models/user.rb index 0e034d32..dbb77124 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -97,6 +97,8 @@ class User < Principal has_many :homework_evaluations, :dependent => :destroy has_many :syllabuses, :dependent => :destroy has_many :syllabus_members, :dependent => :destroy + + has_many :course_members, :dependent => :destroy #问卷相关关关系 has_many :poll_users, :dependent => :destroy has_many :poll_votes, :dependent => :destroy @@ -1125,7 +1127,7 @@ class User < Principal end def member_of_course?(course) - courses.to_a.include?(course) || User.current.business? + course.course_members.exists?(user_id: self.id) || User.current.business? end def member_of_contest?(contest) diff --git a/app/models/user_agent.rb b/app/models/user_agent.rb index 3bb16582..0fabe469 100644 --- a/app/models/user_agent.rb +++ b/app/models/user_agent.rb @@ -1,3 +1,5 @@ +# register_status: 0:未注册;1: 代理之前注册;2:代理之后注册 +# action_status: 0:未注册;1: 代理之前报名;2:代理之后报名 class UserAgent < ActiveRecord::Base has_many :user_actionss, :foreign_key => "ip", :primary_key => "ip" USER_AD = 1 # 广告宣传的引流 diff --git a/app/services/sources_service.rb b/app/services/sources_service.rb index aa95d382..e5857b52 100644 --- a/app/services/sources_service.rb +++ b/app/services/sources_service.rb @@ -171,7 +171,8 @@ class SourcesService def get_user_info params user = User.find params[:id] - {username: user.show_real_name, user_id: user.id, email: user.mail, phone: user.phone, sex: user.sex, school_name: user.school_name} + mail = user.mail.presence || "login@educoder.net" + {username: user.show_real_name, user_id: user.id, email: mail, phone: user.phone, sex: user.sex, school_name: user.school_name} end # courses start ############################################ diff --git a/app/services/users_service.rb b/app/services/users_service.rb index d60de29c..6df15d2a 100644 --- a/app/services/users_service.rb +++ b/app/services/users_service.rb @@ -313,8 +313,8 @@ class UsersService limit = params[:limit]||5 page = params[:page].to_i offset = (page-1) * limit - courses = Course.find_by_sql("SELECT c.* FROM courses c, members m, member_roles mr WHERE m.course_id = c.id AND m.id=mr.member_id AND - mr.role_id in (3,7,9,10) AND + courses = Course.find_by_sql("SELECT c.* FROM courses c, course_members m WHERE m.course_id = c.id AND + m.role in (1,2,3,4) AND m.user_id=#{current_user.id} AND c.is_delete = 0 order by id desc limit #{limit} offset #{offset} ") # 如果还没有课程则显示示例课堂 courses = Course.where(:id => 1309) if courses.count == 0 diff --git a/app/views/account/_user_update_notice.html.erb b/app/views/account/_user_update_notice.html.erb index ca438f35..0fa17fae 100644 --- a/app/views/account/_user_update_notice.html.erb +++ b/app/views/account/_user_update_notice.html.erb @@ -1,7 +1,7 @@
<%= notice.try(:subject) %>
<%= notice.try(:notes) %>+
<%= notice.try(:notes).try(:rstrip) %>
diff --git a/app/views/competitions/_header.html.erb b/app/views/competitions/_header.html.erb index 698238cb..f26eb6ab 100644 --- a/app/views/competitions/_header.html.erb +++ b/app/views/competitions/_header.html.erb @@ -1,5 +1,9 @@ -