Title / Description
Code # encoding: utf-8 class UserMailer < ActionMailer::Base default :from => "noreply@styleup.ru" default_url_options[:host] = "styleup.ru" def self.delay(que = nil) MyUserMailer.new() end def welcome_email(user_id) @user = User.find(user_id) mail(:to => @user.email, :subject => "Добро пожаловать в StyleUP: Здесь Вы можете быстро найти и забронировать лучший салон в вашем городе.") end def booked_appointment_user(appointment_id) @appointment = Appointment.find(appointment_id) @service_provider = @appointment.service_provider @user = @appointment.user date_str = I18n.l @appointment.start_date, :format => '%e-%b-%y' mail(:to => @user.email, :subject => "#{@appointment.service_provider_service_name} забронирован на #{date_str}") end def booked_appointment_service_provider(appointment_id) @appointment = Appointment.find(appointment_id) @service_provider = @appointment.service_provider date_str = I18n.l @appointment.start_date, :format => '%e-%b-%y' mail(:to => @service_provider.user.email, :subject => "#{@appointment.service_provider_service_name} забронирован на #{date_str}") end def welcome_service_provider_email(service_provider_id) @service_provider = ServiceProvider.find(service_provider_id) mail(:to => @service_provider.user.email, :subject => "Добро пожаловать в StyleUP: Профиль успешно создан") end def reset_password_email(user_id, password) @user = User.find(user_id) @password = password mail(:to => @user.email, :subject => "StyleUP: пароль успешно восстановлен") end end
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code