Sha256: 2f9ce1aa52ed17e1146257db229c26bb72ad302c6e9dff4e7d87b35556a85732

Contents?: true

Size: 402 Bytes

Versions: 3

Compression:

Stored size: 402 Bytes

Contents

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

	has_many :live_record_updates, as: :recordable

  def self.live_record_whitelisted_attributes(post, current_user)
	  # Add attributes to this array that you would like current_user to have access to.
	  # Defaults to empty array, thereby blocking everything by default, only unless explicitly stated here so.
	  [:title]
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
live_record-0.1.2 lib/live_record/spec/internal/app/models/post.rb
live_record-0.1.1 lib/live_record/spec/internal/app/models/post.rb
live_record-0.1.0 lib/live_record/spec/internal/app/models/post.rb