Sha256: 3c0531ea075c1a44164db80e2db7a180b76d69749b6257b7030f6dfc9ceb76ad
Contents?: true
Size: 918 Bytes
Versions: 4
Compression:
Stored size: 918 Bytes
Contents
<% if defined?(ActiveRecord::Railtie) -%> class <%= account_path.classify %> < ApplicationRecord include Rodauth::Rails.model<%= "(:#{table_prefix})" unless primary? %> # add concerns above. <%- if account_path.include?("/") -%> self.table_name = :<%= table_prefix.pluralize %> <%- end -%> # add model configurations above. # add belongs_to associations above. # add has_one associations above. # add has_many associations above. # add attachments above. # add scopes above. validates :email, presence: true # add validations above. # add callbacks above. # add delegations above. enum :status, unverified: 1, verified: 2, closed: 3 # add misc attribute macros above. # add methods above. 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
4 entries across 4 versions & 1 rubygems