Sha256: ca24128d85fd6ce03c0647e3ed87754a3a6ffef0d3f783578d60c8cd616dae64

Contents?: true

Size: 503 Bytes

Versions: 9

Compression:

Stored size: 503 Bytes

Contents

# == Schema Information
#
# Table name: posts
#
#  id          :integer          not null, primary key
#  title       :string
#  description :text
#  user_id     :integer          not null
#  created_at  :datetime         not null
#  updated_at  :datetime         not null
#
class Post < ApplicationRecord
  belongs_to :user

  include PubSubModelSync::PublisherConcern
  ps_after_commit(%i[create update destroy]) do |action|
    ps_publish(action, mapping: %i[id title description user_id])
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pub_sub_model_sync-1.4.0 samples/app1/app/models/post.rb
pub_sub_model_sync-1.3.1 samples/app1/app/models/post.rb
pub_sub_model_sync-1.3.0 samples/app1/app/models/post.rb
pub_sub_model_sync-1.2.1 samples/app1/app/models/post.rb
pub_sub_model_sync-1.2.0 samples/app1/app/models/post.rb
pub_sub_model_sync-1.1.1 samples/app1/app/models/post.rb
pub_sub_model_sync-1.1.0 samples/app1/app/models/post.rb
pub_sub_model_sync-1.0.1 samples/app1/app/models/post.rb
pub_sub_model_sync-1.0 samples/app1/app/models/post.rb