Sha256: 586b222213601e4439a6bd072846481ad758c03c656abdcc48c061aedca74fad
Contents?: true
Size: 573 Bytes
Versions: 39
Compression:
Stored size: 573 Bytes
Contents
# frozen_string_literal: true <% module_namespacing do -%> class <%= class_name %> < <%= parent_class_name.classify %> <% attributes.select(&:reference?).each do |attribute| -%> belongs_to :<%= attribute.name %><%= ', polymorphic: true' if attribute.polymorphic? %><%= ', required: true' if attribute.required? %> <% end -%> <% attributes.select(&:token?).each do |attribute| -%> has_secure_token<% if attribute.name != "token" %> :<%= attribute.name %><% end %> <% end -%> <% if attributes.any?(&:password_digest?) -%> has_secure_password <% end -%> end <% end -%>
Version data entries
39 entries across 39 versions & 1 rubygems