FIX: remove links in poll email notification

This commit is contained in:
Régis Hanol
2015-04-26 00:37:27 +02:00
parent 8dc8aaaeb0
commit 10270593a4
2 changed files with 9 additions and 3 deletions

View File

@@ -14,6 +14,11 @@ VOTES_CUSTOM_FIELD ||= "polls-votes".freeze
after_initialize do
# remove "Vote Now!" & "Show Results" links in emails
Email::Styles.register_plugin_style do |fragment|
fragment.css(".poll a.cast-votes, .poll a.toggle-results").each(&:remove)
end
module ::DiscoursePoll
class Engine < ::Rails::Engine
engine_name PLUGIN_NAME