diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 22538d86c..68178e194 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -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 diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 69a3b5e8b..e72bbc491 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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