Method: IshManager::ApplicationMailer#shared_galleries

Defined in:
app/mailers/ish_manager/application_mailer.rb

#shared_galleries(profiles, gallery) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'app/mailers/ish_manager/application_mailer.rb', line 7

def shared_galleries profiles, gallery
  return if profiles.count == 0
  @gallery        = gallery
  @domain         = Rails.application.config.action_mailer.default_url_options[:host]
  @galleries_path = IshManager::Engine.routes.url_helpers.galleries_path
  @gallery_path   = IshManager::Engine.routes.url_helpers.gallery_path(@gallery.slug)
  mail( :to => '[email protected]',
        :bcc => profiles.map { |p| p.email },
        :subject => 'You got new shared galleries on pi manager' )
end