Sha256: e4d434841533211a9b69dc263f76dbf6fdd0f142871a07ad185e1b3f7aa7496c

Contents?: true

Size: 502 Bytes

Versions: 5

Compression:

Stored size: 502 Bytes

Contents

<% if defined?(ActiveRecord::Railtie) -%>
class <%= table_prefix.camelize %> < ApplicationRecord
  include Rodauth::Rails.model
<% if ActiveRecord.version >= Gem::Version.new("7.0") -%>
  enum :status, unverified: 1, verified: 2, closed: 3
<% else -%>
  enum status: { unverified: 1, verified: 2, closed: 3 }
<% end -%>
end
<% else -%>
class <%= table_prefix.camelize %> < Sequel::Model
  include Rodauth::Rails.model
  plugin :enum
  enum :status, unverified: 1, verified: 2, closed: 3
end
<% end -%>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rodauth-rails-1.14.0 lib/generators/rodauth/templates/app/models/account.rb.tt
rodauth-rails-1.11.0 lib/generators/rodauth/templates/app/models/account.rb.tt
rodauth-rails-1.10.0 lib/generators/rodauth/templates/app/models/account.rb.tt
rodauth-rails-1.9.0 lib/generators/rodauth/templates/app/models/account.rb.tt
rodauth-rails-1.8.0 lib/generators/rodauth/templates/app/models/account.rb.tt