Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

Commit

Permalink
protect rakismet attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
bborn committed Oct 5, 2011
1 parent e0167bb commit 9fff611
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/models/comment.rb
@@ -1,6 +1,7 @@
class Comment < ActiveRecord::Base
include Rakismet::Model
rakismet_attrs :author => :author_name, :comment_type => 'comment', :content => :comment, :user_ip => :author_ip
attr_protected :akismet_attrs

belongs_to :commentable, :polymorphic => true
belongs_to :user
Expand Down
1 change: 0 additions & 1 deletion app/models/sb_post.rb
Expand Up @@ -3,7 +3,6 @@ class SbPost < ActiveRecord::Base
include Rakismet::Model
rakismet_attrs :author => :username, :comment_type => 'comment', :content => :body, :user_ip => :author_ip


belongs_to :forum, :counter_cache => true
belongs_to :user, :counter_cache => true
belongs_to :topic, :counter_cache => true
Expand Down
3 changes: 2 additions & 1 deletion app/models/user.rb
Expand Up @@ -3,12 +3,13 @@
class User < ActiveRecord::Base
include Rakismet::Model
rakismet_attrs :author => :login, :comment_type => 'registration', :content => :description, :user_ip => :last_login_ip, :author_email => :email
attr_protected :akismet_attrs

has_many :albums

MALE = 'M'
FEMALE = 'F'
attr_protected :admin, :featured, :role_id
attr_protected :admin, :featured, :role_id, :akismet_attrs

acts_as_authentic do |c|
c.crypto_provider = CommunityEngineSha1CryptoMethod
Expand Down

0 comments on commit 9fff611

Please sign in to comment.