clarion/app/mailers/event_mailer.rb

9 lines
321 B
Ruby
Raw Normal View History

# -*- coding: utf-8 -*-
class EventMailer < ActionMailer::Base
def new_event_notification(event)
@users = User.where(admin: true)
@event = event
mail(to: @users.map(&:email), subject: "Ново предложение за #{@event.class.model_name.human.mb_chars.downcase.to_s}: #{@event.title}")
end
end