Module: Forms::SpamHelper
- Defined in:
- app/helpers/forms/spam_helper.rb
Instance Method Summary collapse
- #listing_spam? ⇒ Boolean
- #not_spam_icon ⇒ Object
- #spam_icon ⇒ Object
- #toggle_spam_link(submission, path) ⇒ Object
Instance Method Details
#listing_spam? ⇒ Boolean
18 19 20 |
# File 'app/helpers/forms/spam_helper.rb', line 18 def listing_spam? controller.action_name == "spam" end |
#not_spam_icon ⇒ Object
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_icon ⇒ Object
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 |
#toggle_spam_link(submission, path) ⇒ Object
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 |