Module: SpammableActions
- Extended by:
- ActiveSupport::Concern
- Includes:
- Gitlab::Utils::StrongMemoize, Recaptcha::Verify
- Defined in:
- app/controllers/concerns/spammable_actions.rb
Instance Method Summary collapse
Methods included from Gitlab::Utils::StrongMemoize
#clear_memoization, #strong_memoize, #strong_memoized?
Instance Method Details
#mark_as_spam ⇒ Object
13 14 15 16 17 18 19 |
# File 'app/controllers/concerns/spammable_actions.rb', line 13 def mark_as_spam if Spam::MarkAsSpamService.new(target: spammable).execute redirect_to spammable_path, notice: _("%{spammable_titlecase} was submitted to Akismet successfully.") % { spammable_titlecase: spammable.spammable_entity_type.titlecase } else redirect_to spammable_path, alert: _('Error with Akismet. Please check the logs for more info.') end end |