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
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
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]
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]