Skip to content

Instantly share code, notes, and snippets.

@Heavyblade
Created July 15, 2013 22:57
Show Gist options
  • Select an option

  • Save Heavyblade/6004231 to your computer and use it in GitHub Desktop.

Select an option

Save Heavyblade/6004231 to your computer and use it in GitHub Desktop.
on(:notify_collaborators, :'email/notify_collaborator') do |activity, opts|
task = activity.ancient
task.assigned_to.each do |username|
user = User.where(:nick => username).first
require 'pry'
binding.pry
t = R18n.set(user.lang || 'en', 'i18n')
emailer = Emailer.new(user.formatted_email, "You have been added to x project")
emailer.lang = (user.lang || 'en')
emailer.send!(:'email/notify_collaborator', :user => user)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment