From: John Dong Date: Fri, 17 Aug 2007 23:44:48 +0000 (-0400) Subject: Fix more DeprecationWarnings X-Git-Url: https://projects.mako.cc/source/selectricity/commitdiff_plain/08ca43a9196b53ae078f6f7737fa544dd2343923 Fix more DeprecationWarnings --- 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]