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',
|
||||
ref: 'fcf574c'
|
||||
gem 'faker' # Generate fake data
|
||||
gem 'httparty'
|
||||
gem 'httparty', '~> 0.13.1'
|
||||
gem 'i18n-js', '~> 3.0' # Localization in javascript files
|
||||
gem 'jbuilder' # JSON structures via a Builder-style DSL
|
||||
gem 'logging', '~> 2.0.0'
|
||||
|
|
|
@ -247,7 +247,8 @@ GEM
|
|||
hammerjs-rails (2.0.8)
|
||||
hashdiff (0.3.8)
|
||||
hashie (3.5.7)
|
||||
httparty (0.16.2)
|
||||
httparty (0.13.7)
|
||||
json (~> 1.8)
|
||||
multi_xml (>= 0.5.2)
|
||||
i18n (0.9.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
|
@ -600,7 +601,7 @@ DEPENDENCIES
|
|||
faker
|
||||
figaro
|
||||
hammerjs-rails
|
||||
httparty
|
||||
httparty (~> 0.13.1)
|
||||
i18n-js (~> 3.0)
|
||||
jbuilder
|
||||
jquery-rails
|
||||
|
|
|
@ -23,15 +23,14 @@ class AppMailer < Devise::Mailer
|
|||
mail(headers)
|
||||
end
|
||||
|
||||
def system_notification(user, system_notification)
|
||||
def system_notification(user, system_notification, opts = {})
|
||||
@user = user
|
||||
@system_notification = system_notification
|
||||
|
||||
headers = {
|
||||
to: @user.email,
|
||||
subject: "[#{t('system_notifications.emails.title')}] "\
|
||||
"#{@system_notification.title}"
|
||||
}
|
||||
subject: t('system_notifications.emails.subject')
|
||||
}.merge(opts)
|
||||
|
||||
mail(headers)
|
||||
end
|
||||
|
|
|
@ -1293,7 +1293,7 @@ en:
|
|||
success_flash: "Successfully added sample group <strong>%{sample_group}</strong> to team <strong>%{team}</strong>."
|
||||
system_notifications:
|
||||
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!"
|
||||
index:
|
||||
whats_new: "What's New"
|
||||
|
|
Loading…
Reference in a new issue