From c933ff40da110253bc4c474d9c79c3a4ed98721d Mon Sep 17 00:00:00 2001 From: Date: Wed, 16 Aug 2006 15:36:30 -0400 Subject: [PATCH] Renamed "elections" controller to "election." --- .../{elections_controller.rb => election_controller.rb} | 4 ++-- app/helpers/election_helper.rb | 2 ++ app/helpers/elections_helper.rb | 2 -- app/views/{elections => election}/_candidate_line.rhtml | 0 app/views/{elections => election}/_candidate_list.rhtml | 0 app/views/{elections => election}/_candidates_form.rhtml | 0 app/views/{elections => election}/_overview_form.rhtml | 0 app/views/{elections => election}/_voter_list.rhtml | 0 app/views/{elections => election}/_voters_form.rhtml | 0 app/views/{elections => election}/_winner.rhtml | 0 app/views/{elections => election}/_winner_details.rhtml | 0 app/views/{elections => election}/detailed_results.rhtml | 0 app/views/{elections => election}/edit.rhtml | 0 app/views/{elections => election}/edit_candidates.rhtml | 0 app/views/{elections => election}/edit_voters.rhtml | 0 app/views/{elections => election}/list.rhtml | 0 app/views/{elections => election}/new.rhtml | 0 app/views/{elections => election}/new_candidates.rhtml | 0 app/views/{elections => election}/new_voters.rhtml | 0 app/views/{elections => election}/show.rhtml | 0 app/views/layouts/{elections.rhtml => election.rhtml} | 0 ...ections_controller_test.rb => election_controller_test.rb} | 0 22 files changed, 4 insertions(+), 4 deletions(-) rename app/controllers/{elections_controller.rb => election_controller.rb} (98%) create mode 100644 app/helpers/election_helper.rb delete mode 100644 app/helpers/elections_helper.rb rename app/views/{elections => election}/_candidate_line.rhtml (100%) rename app/views/{elections => election}/_candidate_list.rhtml (100%) rename app/views/{elections => election}/_candidates_form.rhtml (100%) rename app/views/{elections => election}/_overview_form.rhtml (100%) rename app/views/{elections => election}/_voter_list.rhtml (100%) rename app/views/{elections => election}/_voters_form.rhtml (100%) rename app/views/{elections => election}/_winner.rhtml (100%) rename app/views/{elections => election}/_winner_details.rhtml (100%) rename app/views/{elections => election}/detailed_results.rhtml (100%) rename app/views/{elections => election}/edit.rhtml (100%) rename app/views/{elections => election}/edit_candidates.rhtml (100%) rename app/views/{elections => election}/edit_voters.rhtml (100%) rename app/views/{elections => election}/list.rhtml (100%) rename app/views/{elections => election}/new.rhtml (100%) rename app/views/{elections => election}/new_candidates.rhtml (100%) rename app/views/{elections => election}/new_voters.rhtml (100%) rename app/views/{elections => election}/show.rhtml (100%) rename app/views/layouts/{elections.rhtml => election.rhtml} (100%) rename test/functional/{elections_controller_test.rb => election_controller_test.rb} (100%) diff --git a/app/controllers/elections_controller.rb b/app/controllers/election_controller.rb similarity index 98% rename from app/controllers/elections_controller.rb rename to app/controllers/election_controller.rb index 4cb72bc..aaa3d9f 100644 --- a/app/controllers/elections_controller.rb +++ b/app/controllers/election_controller.rb @@ -1,4 +1,4 @@ -class ElectionsController < ApplicationController +class ElectionController < ApplicationController model :raw_voter_list, :voter, :vote, :candidate ## general methods for dealing with elections @@ -127,7 +127,7 @@ class ElectionsController < ApplicationController def detailed_results self.results - breakpoint + @voter_list = [] @vote_list = [] @election.voters. each do |voter| diff --git a/app/helpers/election_helper.rb b/app/helpers/election_helper.rb new file mode 100644 index 0000000..d05eee6 --- /dev/null +++ b/app/helpers/election_helper.rb @@ -0,0 +1,2 @@ +module ElectionHelper +end diff --git a/app/helpers/elections_helper.rb b/app/helpers/elections_helper.rb deleted file mode 100644 index 09497b1..0000000 --- a/app/helpers/elections_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module ElectionsHelper -end diff --git a/app/views/elections/_candidate_line.rhtml b/app/views/election/_candidate_line.rhtml similarity index 100% rename from app/views/elections/_candidate_line.rhtml rename to app/views/election/_candidate_line.rhtml diff --git a/app/views/elections/_candidate_list.rhtml b/app/views/election/_candidate_list.rhtml similarity index 100% rename from app/views/elections/_candidate_list.rhtml rename to app/views/election/_candidate_list.rhtml diff --git a/app/views/elections/_candidates_form.rhtml b/app/views/election/_candidates_form.rhtml similarity index 100% rename from app/views/elections/_candidates_form.rhtml rename to app/views/election/_candidates_form.rhtml diff --git a/app/views/elections/_overview_form.rhtml b/app/views/election/_overview_form.rhtml similarity index 100% rename from app/views/elections/_overview_form.rhtml rename to app/views/election/_overview_form.rhtml diff --git a/app/views/elections/_voter_list.rhtml b/app/views/election/_voter_list.rhtml similarity index 100% rename from app/views/elections/_voter_list.rhtml rename to app/views/election/_voter_list.rhtml diff --git a/app/views/elections/_voters_form.rhtml b/app/views/election/_voters_form.rhtml similarity index 100% rename from app/views/elections/_voters_form.rhtml rename to app/views/election/_voters_form.rhtml diff --git a/app/views/elections/_winner.rhtml b/app/views/election/_winner.rhtml similarity index 100% rename from app/views/elections/_winner.rhtml rename to app/views/election/_winner.rhtml diff --git a/app/views/elections/_winner_details.rhtml b/app/views/election/_winner_details.rhtml similarity index 100% rename from app/views/elections/_winner_details.rhtml rename to app/views/election/_winner_details.rhtml diff --git a/app/views/elections/detailed_results.rhtml b/app/views/election/detailed_results.rhtml similarity index 100% rename from app/views/elections/detailed_results.rhtml rename to app/views/election/detailed_results.rhtml diff --git a/app/views/elections/edit.rhtml b/app/views/election/edit.rhtml similarity index 100% rename from app/views/elections/edit.rhtml rename to app/views/election/edit.rhtml diff --git a/app/views/elections/edit_candidates.rhtml b/app/views/election/edit_candidates.rhtml similarity index 100% rename from app/views/elections/edit_candidates.rhtml rename to app/views/election/edit_candidates.rhtml diff --git a/app/views/elections/edit_voters.rhtml b/app/views/election/edit_voters.rhtml similarity index 100% rename from app/views/elections/edit_voters.rhtml rename to app/views/election/edit_voters.rhtml diff --git a/app/views/elections/list.rhtml b/app/views/election/list.rhtml similarity index 100% rename from app/views/elections/list.rhtml rename to app/views/election/list.rhtml diff --git a/app/views/elections/new.rhtml b/app/views/election/new.rhtml similarity index 100% rename from app/views/elections/new.rhtml rename to app/views/election/new.rhtml diff --git a/app/views/elections/new_candidates.rhtml b/app/views/election/new_candidates.rhtml similarity index 100% rename from app/views/elections/new_candidates.rhtml rename to app/views/election/new_candidates.rhtml diff --git a/app/views/elections/new_voters.rhtml b/app/views/election/new_voters.rhtml similarity index 100% rename from app/views/elections/new_voters.rhtml rename to app/views/election/new_voters.rhtml diff --git a/app/views/elections/show.rhtml b/app/views/election/show.rhtml similarity index 100% rename from app/views/elections/show.rhtml rename to app/views/election/show.rhtml diff --git a/app/views/layouts/elections.rhtml b/app/views/layouts/election.rhtml similarity index 100% rename from app/views/layouts/elections.rhtml rename to app/views/layouts/election.rhtml diff --git a/test/functional/elections_controller_test.rb b/test/functional/election_controller_test.rb similarity index 100% rename from test/functional/elections_controller_test.rb rename to test/functional/election_controller_test.rb -- 2.30.2