Sha256: 6b406e286194bab959473d645e85153ac56daa61647a7b4bf2d6999d2066e556

Contents?: true

Size: 487 Bytes

Versions: 6

Compression:

Stored size: 487 Bytes

Contents

class Post < ApplicationRecord
  include LiveRecord::Model::Callbacks

  belongs_to :user
  belongs_to :category
  has_many :live_record_updates, as: :recordable, dependent: :destroy

  def self.live_record_whitelisted_attributes(post, current_user)
    [:id, :title, :is_enabled, :category_id, :user_id, :created_at, :updated_at]
  end

  def self.live_record_queryable_attributes(current_user)
    [:id, :title, :is_enabled, :category_id, :user_id, :created_at, :updated_at]
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
live_record-1.0.2 spec/internal/app/models/post.rb
live_record-1.0.1 spec/internal/app/models/post.rb
live_record-1.0.0 spec/internal/app/models/post.rb
live_record-0.3.6 spec/internal/app/models/post.rb
live_record-0.3.4 spec/internal/app/models/post.rb
live_record-0.3.3 spec/internal/app/models/post.rb