notebook/app/models/timeline_event.rb
2020-07-03 19:03:57 -05:00

13 lines
280 B
Ruby

class TimelineEvent < ApplicationRecord
belongs_to :timeline
has_many :timeline_event_entities, dependent: :destroy
acts_as_list scope: [:timeline_id]
# todo move this to a real permissions authorizer
def can_be_modified_by?(user)
user == timeline.user
end
end