From f7761282a6a0744caadfa6ddfb44f09d68c9f928 Mon Sep 17 00:00:00 2001 From: John Dong Date: Mon, 20 Aug 2007 14:58:30 -0400 Subject: [PATCH 1/1] Remove deprecated start_form_tag and end_form_tags. Now you're supposed to do form_tag() do / end blocks. --- app/views/election/edit.rhtml | 4 ++-- app/views/election/edit_candidate.rhtml | 6 +++--- app/views/election/edit_candidates.rhtml | 6 +++--- app/views/election/edit_voters.rhtml | 4 ++-- app/views/election/new.rhtml | 4 ++-- app/views/election/new_voters.rhtml | 4 ++-- app/views/quickvote/_candidate_list.rhtml | 10 +++++----- app/views/quickvote/create.rhtml | 4 ++-- app/views/user/login.rhtml | 4 ++-- app/views/voter/_vote.rhtml | 4 ++-- app/views/voter/index.rhtml | 4 ++-- 11 files changed, 27 insertions(+), 27 deletions(-) diff --git a/app/views/election/edit.rhtml b/app/views/election/edit.rhtml index af0cb49..968d157 100644 --- a/app/views/election/edit.rhtml +++ b/app/views/election/edit.rhtml @@ -1,6 +1,6 @@

<%= @election.name %>: Edit Overview

-<%= start_form_tag :action => 'update', :id => @election %> +<% form_tag(:action => 'update', :id => @election) do %> <%= render :partial => 'overview_form' %> <%= submit_tag 'Done!' %> -<%= end_form_tag %> +<% end %> diff --git a/app/views/election/edit_candidate.rhtml b/app/views/election/edit_candidate.rhtml index e465ae9..fe56aa0 100644 --- a/app/views/election/edit_candidate.rhtml +++ b/app/views/election/edit_candidate.rhtml @@ -1,9 +1,9 @@

Editing <%= @candidate.name %>

<%= error_messages_for :candidate %> -<%= form_tag( { :action => :update_candidate, :id => @candidate.id }, - :multipart => true ) %> +<% form_tag( { :action => :update_candidate, :id => @candidate.id }, + :multipart => true ) do %> <%= render :partial => 'candidate_form' %> <%= submit_tag "Save" %> -<%= end_form_tag %> +<% end %> diff --git a/app/views/election/edit_candidates.rhtml b/app/views/election/edit_candidates.rhtml index cc2c16a..99f2f12 100644 --- a/app/views/election/edit_candidates.rhtml +++ b/app/views/election/edit_candidates.rhtml @@ -16,10 +16,10 @@

Please enter new candidates below.

-<%= form_tag( { :action => :add_candidate, :id => @election.id }, - :multipart => true ) %> +<% form_tag( { :action => :add_candidate, :id => @election.id }, + :multipart => true ) do %> <%= render :partial => 'candidate_form' %> <%= submit_tag "Add Candidate" %> -<%= end_form_tag %> +<% end %> <%= button_to "Done!", :action => 'show', :id => @election %> diff --git a/app/views/election/edit_voters.rhtml b/app/views/election/edit_voters.rhtml index 429a907..1e98fba 100644 --- a/app/views/election/edit_voters.rhtml +++ b/app/views/election/edit_voters.rhtml @@ -3,8 +3,8 @@ <%= render :partial => 'voter_list' %> -<%= form_tag :action => 'edit_voters', :id => @election.id %> +<% form_tag (:action => 'edit_voters', :id => @election.id) do %> <%= render :partial => 'voters_form' %> -<%= end_form_tag %> +<% end %> <%= button_to 'Done!', :action => 'show', :id => @election.id %> diff --git a/app/views/election/new.rhtml b/app/views/election/new.rhtml index fc390a0..7b71748 100644 --- a/app/views/election/new.rhtml +++ b/app/views/election/new.rhtml @@ -2,8 +2,8 @@

Vote Overview

-<%= form_tag :action => 'create_election' %> +<% form_tag (:action => 'create_election') do %> <%= render :partial => 'overview_form' %> <%= submit_tag "Done!" %> -<%= end_form_tag %> +<% end %> diff --git a/app/views/election/new_voters.rhtml b/app/views/election/new_voters.rhtml index b750085..9c3bad3 100644 --- a/app/views/election/new_voters.rhtml +++ b/app/views/election/new_voters.rhtml @@ -3,6 +3,6 @@ <%= render :partial => 'voter_list' %> -<%= form_tag :action => 'new_voters', :id => @election.id %> +<% form_tag(:action => 'new_voters', :id => @election.id) do %> <%= render :partial => 'voters_form' %> -<%= end_form_tag %> +<% end %> diff --git a/app/views/quickvote/_candidate_list.rhtml b/app/views/quickvote/_candidate_list.rhtml index f4f1c06..64aa979 100644 --- a/app/views/quickvote/_candidate_list.rhtml +++ b/app/views/quickvote/_candidate_list.rhtml @@ -1,18 +1,18 @@ <% %> -<% if @flash[:candlist] %> +<% if flash[:candlist] %> <% end %> -<%= form_remote_tag :update => 'candlist', +<% form_remote_tag(:update => 'candlist', :url => { :action => 'add_candidate' }, - :complete => "Field.focus('ajax_newcandidate')" %> + :complete => "Field.focus('ajax_newcandidate')") do %>

<%= text_field "ajax", "newcandidate", :size => 40 %> <%= submit_tag "Add(+)" %>

-<%= end_form_tag %> +<% end %> diff --git a/app/views/quickvote/create.rhtml b/app/views/quickvote/create.rhtml index 6b6ada8..cf91e19 100644 --- a/app/views/quickvote/create.rhtml +++ b/app/views/quickvote/create.rhtml @@ -10,7 +10,7 @@ <%= render :partial => 'candidate_list' %> -<%= form_tag :action => 'create' %> +<% form_tag(:action => 'create') do %>

Please Login

- <%= start_form_tag :action => 'login' %> + <% form_tag(:action => 'login') do %> <%= form_input :text_field, "Login ID", "login", :size => 30 %> <%= form_input :password_field, "Password", "password", :size => 30 %> @@ -13,6 +13,6 @@

<%= link_to 'Register for an account', :action => 'signup' %>

<%= link_to 'Forgot my password', :action => 'forgot_password' %>

- <%= end_form_tag %> + <% end %> diff --git a/app/views/voter/_vote.rhtml b/app/views/voter/_vote.rhtml index d144791..b95fc96 100644 --- a/app/views/voter/_vote.rhtml +++ b/app/views/voter/_vote.rhtml @@ -12,12 +12,12 @@ least preferred. Please list all choices in every vote. (For example, 123 or 321 or 213, etc.)

<% if @voter.election.quickvote? %> - <%= form_tag quickaction_url( :ident => @voter.election.name, :action => 'confirm') %> + <% form_tag(quickaction_url( :ident => @voter.election.name, :action => 'confirm')) do %> <% else %> <%= form_tag :action => 'review', :id => @voter.password %> <% end %> <%= text_field :vote, :votestring -%> <%= submit_tag "Vote!" %> -<%= end_form_tag %> +<% end %> diff --git a/app/views/voter/index.rhtml b/app/views/voter/index.rhtml index 7e31c92..5c2ea27 100644 --- a/app/views/voter/index.rhtml +++ b/app/views/voter/index.rhtml @@ -2,7 +2,7 @@

Please enter your password/token to log in and vote:

-<%= form_tag :action => 'index' %> +<% form_tag(:action => 'index') do %> <%= text_field :vote, :password %> <%= submit_tag "Log In" %> -<%= end_form_tag %> +<% end %> -- 2.39.5