From: Tom Hughes Date: Thu, 2 Sep 2010 22:30:56 +0000 (+0100) Subject: Use <%= instead of <% for block helpers that use concat X-Git-Tag: live~6138 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/b25a468e3c0aeb868f46ea758d4cf33ad7890bcb Use <%= instead of <% for block helpers that use concat --- diff --git a/app/views/diary_entry/edit.html.erb b/app/views/diary_entry/edit.html.erb index b5abd667b..8728427be 100644 --- a/app/views/diary_entry/edit.html.erb +++ b/app/views/diary_entry/edit.html.erb @@ -2,7 +2,7 @@ <%= error_messages_for 'diary_entry' %> -<% form_for :diary_entry do |f| %> +<%= form_for :diary_entry do |f| %> diff --git a/app/views/diary_entry/view.html.erb b/app/views/diary_entry/view.html.erb index 3bc9323e3..2261e2568 100644 --- a/app/views/diary_entry/view.html.erb +++ b/app/views/diary_entry/view.html.erb @@ -13,7 +13,7 @@ <%= error_messages_for 'diary_comment' %> - <% form_for :diary_comment, @diary_comment, :url => { :action => 'comment' } do |f| %> + <%= form_for :diary_comment, @diary_comment, :url => { :action => 'comment' } do |f| %> <%= f.text_area :body, :cols => 80, :rows => 5 %>

diff --git a/app/views/export/_start.html.erb b/app/views/export/_start.html.erb index 722ba9be5..fce26902b 100644 --- a/app/views/export/_start.html.erb +++ b/app/views/export/_start.html.erb @@ -1,4 +1,4 @@ -<% form_tag :action => "finish" do %> +<%= form_tag :action => "finish" do %>

<%= t'export.start.area_to_export' %>

diff --git a/app/views/message/new.html.erb b/app/views/message/new.html.erb index 85de1e51b..f2005bb00 100644 --- a/app/views/message/new.html.erb +++ b/app/views/message/new.html.erb @@ -2,7 +2,7 @@ <%= error_messages_for 'message' %> -<% form_for :message, :url => { :action => "new", :display_name => @to_user.display_name } do |f| %> +<%= form_for :message, :url => { :action => "new", :display_name => @to_user.display_name } do |f| %>
<%= t 'diary_entry.edit.subject' -%>
diff --git a/app/views/oauth/oauthorize.html.erb b/app/views/oauth/oauthorize.html.erb index 28178a85c..ffb403be1 100644 --- a/app/views/oauth/oauthorize.html.erb +++ b/app/views/oauth/oauthorize.html.erb @@ -1,6 +1,6 @@

Authorize access to your account

<%= t('oauth.oauthorize.request_access', :app_name => link_to(@token.client_application.name, @token.client_application.url), :user => link_to(@user.display_name, :controller => :user, :action => :view, :display_name => @user.display_name)) %>

-<% form_tag authorize_url do %> +<%= form_tag authorize_url do %> <%= hidden_field_tag "oauth_token", @token.token %> <%- if params[:oauth_callback] -%> <%= hidden_field_tag "oauth_callback", params[:oauth_callback] %> diff --git a/app/views/oauth_clients/edit.html.erb b/app/views/oauth_clients/edit.html.erb index 085ddef4e..bee1bd183 100644 --- a/app/views/oauth_clients/edit.html.erb +++ b/app/views/oauth_clients/edit.html.erb @@ -1,5 +1,5 @@

<%= t'oauth_clients.edit.title' %>

-<% form_for :client_application, @client_application, :url => oauth_client_path(@client_application.user.display_name, @client_application), :html => { :method => :put } do |f| %> +<%= form_for :client_application, @client_application, :url => oauth_client_path(@client_application.user.display_name, @client_application), :html => { :method => :put } do |f| %> <%= render :partial => "form", :locals => { :f => f } %>
<%= submit_tag t'oauth_clients.edit.submit' %> diff --git a/app/views/oauth_clients/index.html.erb b/app/views/oauth_clients/index.html.erb index d95c68bcb..91c71f90b 100644 --- a/app/views/oauth_clients/index.html.erb +++ b/app/views/oauth_clients/index.html.erb @@ -6,11 +6,11 @@ <% @tokens.each do |token|%> - <% content_tag_for :tr, token do %> + <%= content_tag_for :tr, token do %>
<%= t'message.new.subject' %>
<%= t'oauth_clients.index.application' %> <%= t'oauth_clients.index.issued_at' %> 
<%= link_to token.client_application.name, token.client_application.url %> <%= token.authorized_at %> - <% form_tag :controller => 'oauth', :action => 'revoke' do %> + <%= form_tag :controller => 'oauth', :action => 'revoke' do %> <%= hidden_field_tag 'token', token.token %> <%= submit_tag t('oauth_clients.index.revoke') %> <% end %> @@ -25,7 +25,7 @@ <% else %>

<%= t'oauth_clients.index.registered_apps' %>

<% @client_applications.each do |client|%> - <% div_for client do %> + <%= div_for client do %> <%= link_to client.name, :action => :show, :id => client.id %> <% end %> <% end %> diff --git a/app/views/oauth_clients/new.html.erb b/app/views/oauth_clients/new.html.erb index 292c53fc0..2cd748ac6 100644 --- a/app/views/oauth_clients/new.html.erb +++ b/app/views/oauth_clients/new.html.erb @@ -1,5 +1,5 @@

<%= t'oauth_clients.new.title' %>

-<% form_for :client_application, :url => { :action => :create } do |f| %> +<%= form_for :client_application, :url => { :action => :create } do |f| %> <%= render :partial => "form", :locals => { :f => f } %>
<%= submit_tag t('oauth_clients.new.submit') %> diff --git a/app/views/trace/create.html.erb b/app/views/trace/create.html.erb index 4b168fab0..f4815a946 100644 --- a/app/views/trace/create.html.erb +++ b/app/views/trace/create.html.erb @@ -2,7 +2,7 @@ <%= error_messages_for 'trace' %> -<% form_for :trace, @trace, :url => { :action => "create" }, :html => { :multipart => true } do |f| %> +<%= form_for :trace, @trace, :url => { :action => "create" }, :html => { :multipart => true } do |f| %> diff --git a/app/views/trace/edit.html.erb b/app/views/trace/edit.html.erb index 202f9039d..e1382a1be 100644 --- a/app/views/trace/edit.html.erb +++ b/app/views/trace/edit.html.erb @@ -2,7 +2,7 @@ -<% form_for :trace, @trace do |f| %> +<%= form_for :trace, @trace do |f| %>
<%= t'trace.trace_form.upload_gpx' %><%= f.file_field :gpx_file, :size => 50, :maxlength => 255 %>
<%= t'trace.trace_form.description' %><%= f.text_field :description, :size => 50, :maxlength => 255 %>
diff --git a/app/views/user/account.html.erb b/app/views/user/account.html.erb index bdc52fb8c..606e8c358 100644 --- a/app/views/user/account.html.erb +++ b/app/views/user/account.html.erb @@ -1,6 +1,6 @@

<%= t 'user.account.my settings' %>

<%= error_messages_for 'user' %> -<% form_for :user, :html => { :multipart => true } do |f| %> +<%= form_for :user, :html => { :multipart => true } do |f| %>
diff --git a/app/views/user/list.html.erb b/app/views/user/list.html.erb index fac7c442f..e90a6de8b 100644 --- a/app/views/user/list.html.erb +++ b/app/views/user/list.html.erb @@ -3,7 +3,7 @@

<%= t('user.list.heading') %>

<% unless @users.empty? %> - <% form_tag do %> + <%= form_tag do %> <%= hidden_field_tag :status, params[:status] if params[:status] %> <%= hidden_field_tag :ip, params[:ip] if params[:ip] %> <%= hidden_field_tag :page, params[:page] if params[:page] %> diff --git a/app/views/user/login.html.erb b/app/views/user/login.html.erb index 2d90ba7cf..8c079d0f1 100644 --- a/app/views/user/login.html.erb +++ b/app/views/user/login.html.erb @@ -3,7 +3,7 @@

<%= t 'user.login.heading' %>

- <% form_tag({ :action => "login" }, { :id => "login_form" }) do %> + <%= form_tag({ :action => "login" }, { :id => "login_form" }) do %> <%= hidden_field_tag('referer', h(params[:referer])) %>

<%= t 'user.login.with username' %>

diff --git a/app/views/user/logout.html.erb b/app/views/user/logout.html.erb index e6d0dec59..8cf762474 100644 --- a/app/views/user/logout.html.erb +++ b/app/views/user/logout.html.erb @@ -1,5 +1,5 @@

<%= t 'user.logout.heading' %>

-<% form_tag :action => "logout" do %> +<%= form_tag :action => "logout" do %> <%= hidden_field_tag("referer", h(params[:referer])) %> <%= hidden_field_tag("session", request.session_options[:id]) %> <%= submit_tag t('user.logout.logout_button') %> diff --git a/app/views/user/lost_password.html.erb b/app/views/user/lost_password.html.erb index cdee822e4..db1ee742d 100644 --- a/app/views/user/lost_password.html.erb +++ b/app/views/user/lost_password.html.erb @@ -2,7 +2,7 @@

<%= t 'user.lost_password.help_text' %>

-<% form_tag :action => 'lost_password' do %> +<%= form_tag :action => 'lost_password' do %>
<%= t 'user.new.display name' %>
diff --git a/app/views/user/new.html.erb b/app/views/user/new.html.erb index 730676355..a988afd80 100644 --- a/app/views/user/new.html.erb +++ b/app/views/user/new.html.erb @@ -12,7 +12,7 @@ <%= error_messages_for 'user' %> -<% form_tag :action => 'terms' do %> +<%= form_tag :action => 'terms' do %> <%= hidden_field_tag('referer', h(@referer)) unless @referer.nil? %>
<%= t 'user.lost_password.email address' %>
diff --git a/app/views/user/reset_password.html.erb b/app/views/user/reset_password.html.erb index bb00e8a6e..adb714b00 100644 --- a/app/views/user/reset_password.html.erb +++ b/app/views/user/reset_password.html.erb @@ -2,7 +2,7 @@ <%= error_messages_for :user %> -<% form_tag do %> +<%= form_tag do %> <%= hidden_field_tag(:token, params[:token]) %>
diff --git a/app/views/user/terms.html.erb b/app/views/user/terms.html.erb index e4644e815..db052bb24 100644 --- a/app/views/user/terms.html.erb +++ b/app/views/user/terms.html.erb @@ -3,7 +3,7 @@

<%= t 'user.terms.read and accept' %>

-<% form_tag :action => 'terms' do %> +<%= form_tag :action => 'terms' do %>

<%= t 'user.terms.legale_select' %> <% [['france', 'FR'], ['italy', 'IT'], ['rest_of_world', 'GB']].each do |name,legale| %> @@ -25,7 +25,7 @@ <%= render :partial => "terms" %> -<% form_tag({:action => "save"}, { :id => "termsForm" }) do %> +<%= form_tag({:action => "save"}, { :id => "termsForm" }) do %>

<%= check_box('user', 'consider_pd') %> diff --git a/app/views/user_blocks/edit.html.erb b/app/views/user_blocks/edit.html.erb index 387335d9d..777022dab 100644 --- a/app/views/user_blocks/edit.html.erb +++ b/app/views/user_blocks/edit.html.erb @@ -4,7 +4,7 @@ h(@user_block.user.display_name), {:controller => 'user', :action => 'view', :display_name => @user_block.user.display_name})) %> -<% form_for(@user_block) do |f| %> +<%= form_for(@user_block) do |f| %> <%= f.error_messages %>

diff --git a/app/views/user_blocks/new.html.erb b/app/views/user_blocks/new.html.erb index 3d3e6855c..739d0b08b 100644 --- a/app/views/user_blocks/new.html.erb +++ b/app/views/user_blocks/new.html.erb @@ -4,7 +4,7 @@ h(@this_user.display_name), {:controller => 'user', :action => 'view', :display_name => @this_user.display_name})) %> -<% form_for(@user_block) do |f| %> +<%= form_forevxr(@user_block) do |f| %> <%= f.error_messages %>

diff --git a/app/views/user_blocks/revoke.html.erb b/app/views/user_blocks/revoke.html.erb index 9f142c802..0819357d3 100644 --- a/app/views/user_blocks/revoke.html.erb +++ b/app/views/user_blocks/revoke.html.erb @@ -14,7 +14,7 @@ <%= t('user_block.revoke.time_future', :time => distance_of_time_in_words_to_now(@user_block.ends_at)) %>

-<% form_for :revoke, :url => { :action => "revoke" } do |f| %> +<%= form_for :revoke, :url => { :action => "revoke" } do |f| %> <%= f.error_messages %>

<%= check_box_tag 'confirm', 'yes' %> diff --git a/app/views/user_roles/grant.html.erb b/app/views/user_roles/grant.html.erb index cee4112b7..f88ec2384 100644 --- a/app/views/user_roles/grant.html.erb +++ b/app/views/user_roles/grant.html.erb @@ -1,4 +1,4 @@ -<% form_tag request.request_uri do %> +<%= form_tag request.request_uri do %> <%= hidden_field_tag 'nonce', @nonce %> <% @title = t('user_role.grant.heading') %>

<%= t('user_role.grant.heading') %>

diff --git a/app/views/user_roles/revoke.html.erb b/app/views/user_roles/revoke.html.erb index e5aadeae0..a31a6d81a 100644 --- a/app/views/user_roles/revoke.html.erb +++ b/app/views/user_roles/revoke.html.erb @@ -1,4 +1,4 @@ -<% form_tag request.request_uri do %> +<%= form_tag request.request_uri do %> <%= hidden_field_tag 'nonce', @nonce %> <% @title = t('user_role.revoke.heading') %>

<%= t('user_role.revoke.heading') %>

<%= t 'user.reset_password.password' %><%= password_field(:user, :pass_crypt, {:value => '', :size => 30, :maxlength => 255, :tabindex => 4}) %>