龚乐鑫修改意见2:将系统中control.all.first改为control.all
This commit is contained in:
parent
062a1a4879
commit
e543ad1bdf
|
@ -217,11 +217,11 @@ class AdminController < ApplicationController
|
|||
if request.get?
|
||||
@contest_page = FirstPage.where("page_type = 'contest'").first
|
||||
@first_page = FirstPage.where("page_type = 'project'").first
|
||||
@notification = ContestNotification.all.first;
|
||||
@notification = ContestNotification.first;
|
||||
elsif request.post?
|
||||
@first_page = FirstPage.where("page_type = 'project'").first
|
||||
@contest_page = FirstPage.where("page_type = 'contest'").first
|
||||
@notification = ContestNotification.all.first;
|
||||
@notification = ContestNotification.first;
|
||||
@first_page.web_title = params[:web_title]
|
||||
@contest_page.web_title = params[:web_title]
|
||||
@contest_page.title = params[:contest_title]
|
||||
|
@ -254,13 +254,13 @@ class AdminController < ApplicationController
|
|||
|
||||
def web_footer_made
|
||||
if request.get?
|
||||
@organizer = WebFooterOranizer.all.first
|
||||
@organizer = WebFooterOranizer.first
|
||||
@first_page = FirstPage.where("page_type = 'project'").first
|
||||
#@notification = ContestNotification.all.first;
|
||||
elsif request.post?
|
||||
@first_page = FirstPage.where("page_type = 'project'").first
|
||||
@first_page.web_title = params[:web_title]
|
||||
@organizer = WebFooterOranizer.all.first
|
||||
@organizer = WebFooterOranizer.first
|
||||
if @organizer.nil?
|
||||
@organizer = WebFooterOranizer.new
|
||||
end
|
||||
|
|
|
@ -763,7 +763,7 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def find_web_footer
|
||||
@organize = WebFooterOranizer.all.first
|
||||
@companys = WebFooterCompany.all
|
||||
@organizer = WebFooterOrganizer.first
|
||||
@companies = WebFooterCompany.all
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue