rodauth-rails 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d494712a7d9e548251e812cfb962c74c170663905f4b07f239d7c32f01f2a4c3
4
- data.tar.gz: 064204c2a262f5cae1360d8509623595a333acb43cbf421f0bfa45bb6b7de36a
3
+ metadata.gz: cca905fd1f4b103aef68317cf45c2758d432b32c0f91a50e2f896c83750c4567
4
+ data.tar.gz: 3170987bb8ba8821d66c2ad46369be451069d3cac01d0bcc6aa7f3e149b150f1
5
5
  SHA512:
6
- metadata.gz: 5a8a072ee2d3f615f14df9484ff04a1d1f85ebbef0aa0273087fca7042d437ac04e8628392e56b81c4ab23940aa7a3b4ca324899d53079d51bd5dda296429285
7
- data.tar.gz: a79173adc2a6edd193e8cdb5b11124387f3cc0ab8c001032fe564ed0824ef0a007b5bcadeab98800c149ad303aa5f032359e0cca917c2491a34c8c10ebc0dc22
6
+ metadata.gz: 13108dbbf6bedd2201c58b4377defbc9a41fa893c874b5ac833c1fd63d3b2b418dc397c59a50cc1eede6739d5d4e6a9d682e10f5a061645f8cd0eae9ac2cb0cb
7
+ data.tar.gz: d0bec919f0fdadfb978b15c6da1e35ba18a823c27b4e75b715eac536bff8a9f886567b3ff918384594546ed4f31de4897bb886164ebbc0a622cadd7e01b45eb4
@@ -12,20 +12,18 @@ module Rodauth
12
12
 
13
13
  # Create emails with ActionMailer which uses configured delivery method.
14
14
  def create_email_to(to, subject, body)
15
- Mailer.create_email(to: to, from: email_from, subject: "#{email_subject_prefix}#{subject}", body: body)
15
+ Rodauth::Rails::Mailer.create_email(
16
+ to: to,
17
+ from: email_from,
18
+ subject: "#{email_subject_prefix}#{subject}",
19
+ body: body
20
+ )
16
21
  end
17
22
 
18
23
  # Delivers the given email.
19
24
  def send_email(email)
20
25
  email.deliver_now
21
26
  end
22
-
23
- # ActionMailer subclass for correct email delivering.
24
- class Mailer < ActionMailer::Base
25
- def create_email(options)
26
- mail(options)
27
- end
28
- end
29
27
  end
30
28
  end
31
29
  end
@@ -0,0 +1,9 @@
1
+ module Rodauth
2
+ module Rails
3
+ class Mailer < ActionMailer::Base
4
+ def create_email(options)
5
+ mail(options)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -1,5 +1,5 @@
1
1
  module Rodauth
2
2
  module Rails
3
- VERSION = "2.0.0"
3
+ VERSION = "2.0.1"
4
4
  end
5
5
  end
data/lib/rodauth/rails.rb CHANGED
@@ -10,6 +10,7 @@ module Rodauth
10
10
  # This allows avoiding loading Rodauth at boot time.
11
11
  autoload :App, "rodauth/rails/app"
12
12
  autoload :Auth, "rodauth/rails/auth"
13
+ autoload :Mailer, "rodauth/rails/mailer"
13
14
 
14
15
  @app = nil
15
16
  @middleware = true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rodauth-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Janko Marohnić
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-16 00:00:00.000000000 Z
11
+ date: 2024-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -337,6 +337,7 @@ files:
337
337
  - lib/rodauth/rails/feature/instrumentation.rb
338
338
  - lib/rodauth/rails/feature/internal_request.rb
339
339
  - lib/rodauth/rails/feature/render.rb
340
+ - lib/rodauth/rails/mailer.rb
340
341
  - lib/rodauth/rails/middleware.rb
341
342
  - lib/rodauth/rails/railtie.rb
342
343
  - lib/rodauth/rails/tasks.rake