Changeset 105
- Timestamp:
- 11/08/10 13:47:41 (2 years ago)
- Files:
-
- app/controllers/author_controller.rb (modified) (2 diffs)
- app/controllers/category_controller.rb (modified) (2 diffs)
- app/controllers/quotation_controller.rb (modified) (2 diffs)
- app/views/author/_list_content.rhtml (modified) (1 diff)
- app/views/category/_list_content.rhtml (modified) (1 diff)
- app/views/quotation/_list_content.rhtml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
app/controllers/author_controller.rb
r104 r105 6 6 7 7 # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) 8 verify :method => :post, :only => [ :create, :update ],9 :redirect_to => { :action => : list}8 verify :method => :post, :only => [ :create, :update, :destroy ], 9 :redirect_to => { :action => :wrong } 10 10 11 11 # get all public for not logged in users and … … 105 105 redirect_to :action => 'list' 106 106 end 107 108 def wrong 109 flash[:error] = "Da ist etwas schiefgegangen." 110 redirect_to :action => 'list' 111 end 112 107 113 end app/controllers/category_controller.rb
r104 r105 2 2 3 3 # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) 4 verify :method => :post, :only => [ :create, :update ],5 :redirect_to => { :action => : list}4 verify :method => :post, :only => [ :create, :update, :destroy ], 5 :redirect_to => { :action => :wrong } 6 6 7 7 def index … … 105 105 redirect_to :action => 'list' 106 106 end 107 108 def wrong 109 flash[:error] = "Da ist etwas schiefgegangen." 110 redirect_to :action => 'list' 111 end 112 107 113 end app/controllers/quotation_controller.rb
r104 r105 6 6 7 7 # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) 8 verify :method => :post, :only => [ :create, :update ],9 :redirect_to => { :action => : list}8 verify :method => :post, :only => [ :create, :update, :destroy ], 9 :redirect_to => { :action => :wrong} 10 10 11 11 # get all public for not logged in users and … … 165 165 redirect_to :action => 'list' 166 166 end 167 168 def wrong 169 flash[:error] = "Da ist etwas schiefgegangen." 170 redirect_to :action => 'list' 171 end 172 167 173 end app/views/author/_list_content.rhtml
r63 r105 27 27 28 28 <% if quotations == 0 %> 29 <%= link_to image_tag("cancel.png", :alt => 'rotes Kreuz', :title => 'Löschen', :border => 0), { :action => 'destroy', :id => author }, :confirm => "Wirklich den Author \"#{author.firstname} #{author.name}\" löschen?", : post => true%>29 <%= link_to image_tag("cancel.png", :alt => 'rotes Kreuz', :title => 'Löschen', :border => 0), { :action => 'destroy', :id => author }, :confirm => "Wirklich den Author \"#{author.firstname} #{author.name}\" löschen?", :method => :post %> 30 30 <% end %> 31 31 <% end %> app/views/category/_list_content.rhtml
r63 r105 26 26 27 27 <% if quotations == 0 %> 28 <%= link_to image_tag("cancel.png", :alt => 'rotes Kreuz', :title => 'Löschen', :border => 0), { :action => 'destroy', :id => category }, :confirm => "Wirklich die Kategorie \"#{category.category}\" löschen?", : post => true%>28 <%= link_to image_tag("cancel.png", :alt => 'rotes Kreuz', :title => 'Löschen', :border => 0), { :action => 'destroy', :id => category }, :confirm => "Wirklich die Kategorie \"#{category.category}\" löschen?", :method => :post %> 29 29 <% end %> 30 30 <% end %> app/views/quotation/_list_content.rhtml
r46 r105 24 24 <%= link_to image_tag("pencil.png", :alt => 'Stift', :title => 'Bearbeiten', :border => 0), :action => 'edit', :id => quotation %> 25 25 26 <%= link_to image_tag("cancel.png", :alt => 'rotes Kreuz', :title => 'Löschen', :border => 0), { :action => 'destroy', :id => quotation }, :confirm => "Wirklich das Zitat \"" + truncate(quotation.quotation, 20) + "\" löschen?", : post => true%>26 <%= link_to image_tag("cancel.png", :alt => 'rotes Kreuz', :title => 'Löschen', :border => 0), { :action => 'destroy', :id => quotation }, :confirm => "Wirklich das Zitat \"" + truncate(quotation.quotation, 20) + "\" löschen?", :method => :post %> 27 27 <% end %> 28 28 </td>