app/mailers/manager_mailer.rb
# Subject can be set in your I18n file at config/locales/en.yml
# with the following lookup:
#
#   en.manager_mailer.activity_completed.subject
#
Subject can be set in your I18n file at config/locales/en.yml
with the following lookup.


Subject can be set in your I18n file at config / locales / en . yml with the following lookup .
def activity_completed
    @user = params[:user]
    @band = params[:band]
    @activity = params[:activity]
    action = @activity.action.sub('_', ' ')
    action = case action
    when 'practice'          then 'has finished practicing'
    when 'gig'               then 'has finished playing a gig'
    when 'hired'             then 'has hired a new member'
    when 'release'           then 'has finished their release'
    when 'write song'        then 'has written a song'
    when 'record single'     then 'has recorded as single'
    when 'formed'            then 'has formed'
    when 'fired'             then 'has fired a member'
    when 'rest'              then 'has rested'
    when 'recording deleted' then 'has deleted a recording'
    else action
    end
    mail to: @user.email, subject: default_i18n_subject(band_name: @band.name, action: action)
  end
def activity_completed @user = params [ :user ] @band = params [ :band ] @activity = params [ :activity ] action = @activity . action . sub ( '_' , ' ' ) action = case action when 'practice' then 'has finished practicing' when 'gig' then 'has finished playing a gig' when 'hired' then 'has hired a new member' when 'release' then 'has finished their release' when 'write song' then 'has written a song' when 'record single' then 'has recorded as single' when 'formed' then 'has formed' when 'fired' then 'has fired a member' when 'rest' then 'has rested' when 'recording deleted' then 'has deleted a recording' else action end mail to : @user . email , subject : default_i18n_subject ( band_name : @band . name , action : action ) end
Subject can be set in your I18n file at config/locales/en.yml
with the following lookup:
Subject can be set in your I18n file at config / locales / en . yml with the following lookup :