mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 14:45:56 +08:00
Set version for HTTParty dependency, add opts in mailer
This commit is contained in:
parent
f63eaaefe7
commit
d3d9868ba4
2
Gemfile
2
Gemfile
|
@ -59,7 +59,7 @@ gem 'delayed_paperclip',
|
||||||
git: 'https://github.com/jrgifford/delayed_paperclip.git',
|
git: 'https://github.com/jrgifford/delayed_paperclip.git',
|
||||||
ref: 'fcf574c'
|
ref: 'fcf574c'
|
||||||
gem 'faker' # Generate fake data
|
gem 'faker' # Generate fake data
|
||||||
gem 'httparty'
|
gem 'httparty', '~> 0.13.1'
|
||||||
gem 'i18n-js', '~> 3.0' # Localization in javascript files
|
gem 'i18n-js', '~> 3.0' # Localization in javascript files
|
||||||
gem 'jbuilder' # JSON structures via a Builder-style DSL
|
gem 'jbuilder' # JSON structures via a Builder-style DSL
|
||||||
gem 'logging', '~> 2.0.0'
|
gem 'logging', '~> 2.0.0'
|
||||||
|
|
|
@ -247,7 +247,8 @@ GEM
|
||||||
hammerjs-rails (2.0.8)
|
hammerjs-rails (2.0.8)
|
||||||
hashdiff (0.3.8)
|
hashdiff (0.3.8)
|
||||||
hashie (3.5.7)
|
hashie (3.5.7)
|
||||||
httparty (0.16.2)
|
httparty (0.13.7)
|
||||||
|
json (~> 1.8)
|
||||||
multi_xml (>= 0.5.2)
|
multi_xml (>= 0.5.2)
|
||||||
i18n (0.9.5)
|
i18n (0.9.5)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
|
@ -600,7 +601,7 @@ DEPENDENCIES
|
||||||
faker
|
faker
|
||||||
figaro
|
figaro
|
||||||
hammerjs-rails
|
hammerjs-rails
|
||||||
httparty
|
httparty (~> 0.13.1)
|
||||||
i18n-js (~> 3.0)
|
i18n-js (~> 3.0)
|
||||||
jbuilder
|
jbuilder
|
||||||
jquery-rails
|
jquery-rails
|
||||||
|
|
|
@ -23,15 +23,14 @@ class AppMailer < Devise::Mailer
|
||||||
mail(headers)
|
mail(headers)
|
||||||
end
|
end
|
||||||
|
|
||||||
def system_notification(user, system_notification)
|
def system_notification(user, system_notification, opts = {})
|
||||||
@user = user
|
@user = user
|
||||||
@system_notification = system_notification
|
@system_notification = system_notification
|
||||||
|
|
||||||
headers = {
|
headers = {
|
||||||
to: @user.email,
|
to: @user.email,
|
||||||
subject: "[#{t('system_notifications.emails.title')}] "\
|
subject: t('system_notifications.emails.subject')
|
||||||
"#{@system_notification.title}"
|
}.merge(opts)
|
||||||
}
|
|
||||||
|
|
||||||
mail(headers)
|
mail(headers)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1293,7 +1293,7 @@ en:
|
||||||
success_flash: "Successfully added sample group <strong>%{sample_group}</strong> to team <strong>%{team}</strong>."
|
success_flash: "Successfully added sample group <strong>%{sample_group}</strong> to team <strong>%{team}</strong>."
|
||||||
system_notifications:
|
system_notifications:
|
||||||
emails:
|
emails:
|
||||||
title: "What's new notification"
|
subject: "You've received a What's new notification"
|
||||||
intro_paragraph: "Hello %{user_name}, you received new What's new notification!"
|
intro_paragraph: "Hello %{user_name}, you received new What's new notification!"
|
||||||
index:
|
index:
|
||||||
whats_new: "What's New"
|
whats_new: "What's New"
|
||||||
|
|
Loading…
Reference in a new issue