File tree 3 files changed +8
-6
lines changed
app/services/ops/coupon/expiration
3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ module Ops
4
4
module Coupon
5
5
module Expiration
6
6
class Notify
7
- include Rails . application . routes . url_helpers
8
-
9
7
attr_reader :coupon
10
8
11
9
delegate :user , to : :coupon
@@ -30,11 +28,10 @@ def template_options
30
28
"code" => coupon . code ,
31
29
"description" => coupon . description ,
32
30
"valid_until" => coupon . valid_until . present? ? I18n . l ( coupon . valid_until ) : "" ,
33
- "url" => coupon_url (
31
+ "url" => Rails . application . routes . url_helpers . coupon_url (
34
32
user . locale ,
35
33
coupon ,
36
- host : Rails . application . config . action_controller . default_url_options [ :host ] ,
37
- port : Rails . application . config . action_controller . default_url_options [ :port ]
34
+ **Rails . application . config . action_controller . default_url_options
38
35
)
39
36
}
40
37
end
Original file line number Diff line number Diff line change @@ -43,7 +43,11 @@ class Application < Rails::Application
43
43
I18n . available_locales = %i[ en ]
44
44
I18n . default_locale = :en
45
45
46
- config . action_mailer . default_url_options = { host : ENV . fetch ( "HOST" , "localhost" ) , port : 443 }
46
+ config . action_mailer . default_url_options = {
47
+ host : ENV . fetch ( "HOST" , "localhost" ) ,
48
+ port : 443 ,
49
+ protocol : :https
50
+ }
47
51
config . action_controller . default_url_options = config . action_mailer . default_url_options
48
52
end
49
53
end
Original file line number Diff line number Diff line change 76
76
config . action_controller . raise_on_missing_callback_actions = true
77
77
78
78
config . action_controller . default_url_options [ :port ] = 3000
79
+ config . action_controller . default_url_options [ :protocol ] = :http
79
80
end
You can’t perform that action at this time.
0 commit comments