Sha256: 22792cc59cd466a2335e0c53bd82d1186c034f11cca45a2a1abfc7736f4c2889
Contents?: true
Size: 1.08 KB
Versions: 1
Compression:
Stored size: 1.08 KB
Contents
<% 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 -%> <% if attributes.any?(&:password_digest?) -%> has_secure_password <% end -%> # == Constants ============================================================ # == Attributes =========================================================== # == Extensions =========================================================== # == Relationships ======================================================== # == Validations ========================================================== # == Scopes =============================================================== # == Callbacks ============================================================ # == Class Methods ======================================================== # == Instance Methods ===================================================== end <% end -%>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
block_templates-0.1.0 | lib/templates/active_record/model/model.rb |