From 08ca43a9196b53ae078f6f7737fa544dd2343923 Mon Sep 17 00:00:00 2001 From: John Dong Date: Fri, 17 Aug 2007 19:44:48 -0400 Subject: [PATCH] Fix more DeprecationWarnings --- app/controllers/election_controller.rb | 5 ++++- app/controllers/quickvote_controller.rb | 8 ++++---- app/controllers/site_controller.rb | 4 +++- app/controllers/voter_controller.rb | 6 +++--- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/app/controllers/election_controller.rb b/app/controllers/election_controller.rb index df0aa7c..d333294 100644 --- a/app/controllers/election_controller.rb +++ b/app/controllers/election_controller.rb @@ -1,5 +1,8 @@ class ElectionController < ApplicationController - model :raw_voter_list, :voter, :vote, :candidate + require_dependency "raw_voter_list" + require_dependency "voter" + require_dependency "vote" + require_dependency "candidate" layout 'main' #before_filter :login_required diff --git a/app/controllers/quickvote_controller.rb b/app/controllers/quickvote_controller.rb index 8b853eb..41d0dc3 100644 --- a/app/controllers/quickvote_controller.rb +++ b/app/controllers/quickvote_controller.rb @@ -1,9 +1,9 @@ class QuickvoteController < ApplicationController layout 'main' - model :quick_voter - model :quick_vote - model :vote - model :election + require_dependency "quick_voter" + require_dependency "quick_vote" + require_dependency "vote" + require_dependency "election" ############################################################# # the following methods pertain to creating quickvotes diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index a33a1fa..80fdfc4 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -1,6 +1,8 @@ class SiteController < ApplicationController layout 'main' - model :user, :election, :account + require_dependency "user" + require_dependency "election" + require_dependency "account" def index @quickvotes = QuickVote.find(:all).sort {|a,b| b.enddate <=> a.enddate}[0..1] diff --git a/app/controllers/voter_controller.rb b/app/controllers/voter_controller.rb index e94f4a7..f4e0e7e 100644 --- a/app/controllers/voter_controller.rb +++ b/app/controllers/voter_controller.rb @@ -1,8 +1,8 @@ class VoterController < ApplicationController layout 'main' - model :voter - model :vote - model :election + require_dependency "voter" + require_dependency "vote" + require_dependency "election" def index password = params[:id] -- 2.39.5