Skip to content

Commit

Permalink
Fix undefined table error on Rails 7.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
tnantoka committed Feb 13, 2024
1 parent 9d73608 commit 9ec707e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 2 additions & 0 deletions app/models/lets_encrypt/certificate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class Certificate < ApplicationRecord
include CertificateVerifiable
include CertificateIssuable

self.table_name = 'letsencrypt_certificates'

validates :domain, presence: true, uniqueness: true

scope :active, -> { where('certificate IS NOT NULL AND expires_at > ?', Time.zone.now) }
Expand Down
5 changes: 0 additions & 5 deletions lib/letsencrypt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ def config(&block)
@config
end

# @api private
def table_name_prefix
'letsencrypt_'
end

def certificate_model
@certificate_model ||= config.certificate_model.constantize
end
Expand Down

0 comments on commit 9ec707e

Please sign in to comment.