mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 01:31:39 -05:00
* Add yearly digest * Rename YearlyDigests to Users::Digests * Minor changes * Update yearly digest layout and styles * Add flags and chart to email * Update colors * Fix layout of stats in yearly digest view * Remove cron job for yearly digest scheduling * Update CHANGELOG.md * Update digest email setting handling * Allow sharing digest for 1 week or 1 month * Change Digests Distance to Bigint * Fix settings page
17 lines
391 B
Ruby
17 lines
391 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Users::DigestsMailer < ApplicationMailer
|
|
helper Users::DigestsHelper
|
|
helper CountryFlagHelper
|
|
|
|
def year_end_digest
|
|
@user = params[:user]
|
|
@digest = params[:digest]
|
|
@distance_unit = @user.safe_settings.distance_unit || 'km'
|
|
|
|
mail(
|
|
to: @user.email,
|
|
subject: "Your #{@digest.year} Year in Review - Dawarich"
|
|
)
|
|
end
|
|
end
|