Sha256: f1cc7f82ec54465a776c23ae8aba5cc3d37c26343f2c39ac6c78edf680afcdd9

Contents?: true

Size: 252 Bytes

Versions: 5

Compression:

Stored size: 252 Bytes

Contents

module <%= class_name %>
  class Payload < ActiveRecord::Base
    self.table_name = "<%= singular_name %>_payloads"

    serialize :body

    validates :generated_at, presence: true
    validates :subject_id, presence: true, uniqueness: true
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sync_machine-1.4.0 lib/rails/generators/active_record/templates/payload.rb
sync_machine-1.3.0 lib/rails/generators/active_record/templates/payload.rb
sync_machine-1.2.0 lib/rails/generators/active_record/templates/payload.rb
sync_machine-1.1.1 lib/rails/generators/active_record/templates/payload.rb
sync_machine-1.1.0 lib/rails/generators/active_record/templates/payload.rb