Permalink
Browse files

add remove banned words logic in bw_controller

  • Loading branch information...
1 parent f6dfe3e commit 076d92380aeac7a2be62b6e481e3cbf784627298 @razvan-sv committed Mar 23, 2012
Showing with 2 additions and 3 deletions.
  1. +1 −0 app/controllers/banned_words_controller.rb
  2. +1 −3 app/views/banned_words/_index.html.erb
@@ -11,6 +11,7 @@ def clear
end
def destroy
+ BannedWords.remove(params[:name])
redirect_to root_path
end
@@ -1,10 +1,8 @@
<h2 style="margin-bottom: 30px;">
Existing Banned Words
- <%= link_to "Clear All", clear_bw_path, :class => "btn btn-danger" %>
+ <%= link_to "Clear All", clear_bw_path, :class => "btn btn-danger", :confirm => "Are you sure?" %>
</h2>
-
<div id="bw">
<%= render "banned_words/list" %>
</div>
-
<%= render "banned_words/form" %>

0 comments on commit 076d923

Please sign in to comment.