Sha256: 64b0cefffa10be68d23825eb01f5bd53bc97103d5d31a1809798ea95b1814b99

Contents?: true

Size: 278 Bytes

Versions: 2

Compression:

Stored size: 278 Bytes

Contents

module AntiSpam
	module ProtectFromSpam
		def protect_from_spam
			if params[:antispam_token] != AntiSpam.token
				render text: "Spam not allowed, please enable your JavaScript", status: 403
			end
		end
	end
end

ActionController::Base.send :include, AntiSpam::ProtectFromSpam

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
anti_spam-0.0.2 lib/anti_spam/protect_from_spam.rb
anti_spam-0.0.1 lib/anti_spam/protect_from_spam.rb