avoid leaking object ids in form_fors
This commit is contained in:
parent
354143e9c5
commit
a16e99c686
3 changed files with 7 additions and 5 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<div class="comment comment_form_container">
|
||||
<%= form_for comment do |f| %>
|
||||
<%= form_for comment,
|
||||
:html => { :id => "edit_comment_#{comment.short_id}" } do |f| %>
|
||||
<% if comment.errors.any? %>
|
||||
<%= errors_for comment %>
|
||||
<% end %>
|
||||
|
|
@ -38,7 +39,6 @@
|
|||
:type => "button" %>
|
||||
<% end %>
|
||||
|
||||
|
||||
<div style="clear: both;"></div>
|
||||
|
||||
<%= render :partial => "global/markdownhelp" %>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@
|
|||
Account Settings
|
||||
</div>
|
||||
|
||||
<%= form_for @edit_user, :url => settings_url, :method => :post do |f| %>
|
||||
<%= form_for @edit_user, :url => settings_url, :method => :post,
|
||||
:html => { :id => "edit_user" } do |f| %>
|
||||
<%= error_messages_for f.object %>
|
||||
|
||||
<div class="boxline">
|
||||
|
|
@ -170,7 +171,8 @@
|
|||
<br>
|
||||
<br>
|
||||
|
||||
<%= form_for @edit_user, :url => delete_account_url, :method => :post do |f| %>
|
||||
<%= form_for @edit_user, :url => delete_account_url, :method => :post,
|
||||
:html => { :id => "delete_user" } do |f| %>
|
||||
<div class="legend">
|
||||
Delete Account
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
</div>
|
||||
|
||||
<%= form_for @story, :url => story_url(@story.short_id),
|
||||
:method => :put do |f| %>
|
||||
:method => :put, :html => { :id => "edit_story" } do |f| %>
|
||||
<%= render :partial => "stories/form", :locals => { :story => @story,
|
||||
:f => f } %>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue