Commit ab47509b9f4250831908414a33f2bc44607cb11d

Authored by Victor Costa
1 parent 94196aae

rails3: fix anti_spam plugin

plugins/anti_spam/Gemfile 0 → 100644
... ... @@ -0,0 +1 @@
  1 +gem 'rakismet'
... ...
plugins/anti_spam/test/unit/anti_spam_plugin/comment_wrapper_test.rb
... ... @@ -3,7 +3,7 @@ require 'test_helper'
3 3 class AntiSpamPlugin::CommentWrapperTest < ActiveSupport::TestCase
4 4  
5 5 def setup
6   - @comment = Comment.new(
  6 + @comment = build(Comment,
7 7 :title => 'comment title',
8 8 :body => 'comment body',
9 9 :name => 'foo',
... ...
plugins/anti_spam/views/anti_spam_plugin_admin/index.html.erb 0 → 100644
... ... @@ -0,0 +1,14 @@
  1 +<h1><%= _('AntiSpam settings')%></h1>
  2 +
  3 +<%= form_for(:settings) do |f| %>
  4 +
  5 + <%= labelled_form_field _('Host'), f.text_field(:host) %>
  6 +
  7 + <%= labelled_form_field _('API key'), f.text_field(:api_key, :size => 40) %>
  8 +
  9 + <% button_bar do %>
  10 + <%= submit_button(:save, _('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %>
  11 + <% end %>
  12 +
  13 +<% end %>
  14 +
... ...
plugins/anti_spam/views/anti_spam_plugin_admin/index.rhtml
... ... @@ -1,14 +0,0 @@
1   -<h1><%= _('AntiSpam settings')%></h1>
2   -
3   -<%= form_for(:settings) do |f| %>
4   -
5   - <%= labelled_form_field _('Host'), f.text_field(:host) %>
6   -
7   - <%= labelled_form_field _('API key'), f.text_field(:api_key, :size => 40) %>
8   -
9   - <% button_bar do %>
10   - <%= submit_button(:save, _('Save'), :cancel => {:controller => 'plugins', :action => 'index'}) %>
11   - <% end %>
12   -
13   -<% end %>
14   -