Enable RTL direction in emails.

This commit is contained in:
Eyal Levin
2014-08-27 14:38:03 +03:00
parent 009dc7ded3
commit e0c2f3df3a
6 changed files with 94 additions and 18 deletions

View File

@@ -198,7 +198,11 @@ class UserNotifications < ActionMailer::Base
html = UserNotificationRenderer.new(Rails.configuration.paths["app/views"]).render(
template: 'email/notification',
format: :html,
locals: { context_posts: context_posts, post: post, top: top ? PrettyText.cook(top).html_safe : nil }
locals: { context_posts: context_posts,
post: post,
top: top ? PrettyText.cook(top).html_safe : nil,
classes: RTL.new(user).css_class
}
)
template = "user_notifications.user_#{notification_type}"