Module: Forms::SpamHelper

Defined in:
app/helpers/forms/spam_helper.rb

Instance Method Summary collapse

Instance Method Details

#listing_spam?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'app/helpers/forms/spam_helper.rb', line 18

def listing_spam?
  controller.action_name == "spam"
end

#not_spam_iconObject



6
7
8
# File 'app/helpers/forms/spam_helper.rb', line 6

def not_spam_icon
  icon("wheelhouse-forms/not-spam.png", :alt => "Mark as not spam", :title => "Click to mark submission as not spam")
end

#spam_iconObject



2
3
4
# File 'app/helpers/forms/spam_helper.rb', line 2

def spam_icon
  icon("wheelhouse-forms/spam.png", :alt => "Mark as spam", :title => "Click to mark submission as spam")
end


10
11
12
13
14
15
16
# File 'app/helpers/forms/spam_helper.rb', line 10

def toggle_spam_link(submission, path)
  if submission.spam?
    link_to not_spam_icon, path, :class => "not-spam"
  else
    link_to spam_icon, path, :class => "mark-spam"
  end
end