Sha256: d85289907ec437e0da6ee82f4d6946689d07b2650738e64bcc2f0d6545e9ec9d

Contents?: true

Size: 476 Bytes

Versions: 9

Compression:

Stored size: 476 Bytes

Contents

<% module_namespacing do -%>
class <%= class_name %> < <%= parent_class_name.classify %>
  include OscMacheteRails::Statusable

<% attributes.select(&:reference?).each do |attribute| -%>
  belongs_to :<%= attribute.name %><%= ', polymorphic: true' if attribute.polymorphic? %>
<% end -%>
<% if attributes.any?(&:password_digest?) -%>
  has_secure_password
<% end -%>

  # Determine if the results are valid
  # def results_valid?
  #   # CODE GOES HERE
  # end
end
<% end -%>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
osc_machete_rails-2.1.2 lib/generators/active_record/templates/job_model.rb
osc_machete_rails-2.1.0 lib/generators/active_record/templates/job_model.rb
osc_machete_rails-2.0.0 lib/generators/active_record/templates/job_model.rb
osc_machete_rails-1.3.1 lib/generators/active_record/templates/job_model.rb
osc_machete_rails-1.3.0 lib/generators/active_record/templates/job_model.rb
osc_machete_rails-1.2.2 lib/generators/active_record/templates/job_model.rb
osc_machete_rails-2.0.0.pre1 lib/generators/active_record/templates/job_model.rb
osc_machete_rails-1.2.1 lib/generators/active_record/templates/job_model.rb
osc_machete_rails-1.2.0 lib/generators/active_record/templates/job_model.rb