lib/rakismet/model.rb in rakismet-1.3.0 vs lib/rakismet/model.rb in rakismet-1.4.0

- old
+ new

@@ -12,11 +12,11 @@ end module ClassMethods def rakismet_attrs(args={}) self.akismet_attrs ||= {} - [:comment_type, :author, :author_url, :author_email, :content, :user_role].each do |field| + [:comment_type, :author, :author_url, :author_email, :content, :user_role, :permalink].each do |field| # clunky, but throwing around +type+ will break your heart fieldname = field.to_s =~ %r(^comment_) ? field : "comment_#{field}".intern self.akismet_attrs[fieldname] = args.delete(field) || field end [:user_ip, :user_agent, :referrer].each do |field| @@ -62,10 +62,10 @@ data.merge attr => if mapped_field.is_a?(Proc) instance_eval(&mapped_field) elsif !mapped_field.nil? && respond_to?(mapped_field) send(mapped_field) elsif not [:comment_type, :author, :author_email, - :author_url, :content, :user_role, + :author_url, :content, :user_role, :permalink, :user_ip, :referrer, :user_agent].include?(mapped_field) # we've excluded any fields that appear to # have their default unmapped values mapped_field