app/policies/pirep_policy.rb
def update?
    if @user.can?(Pirep, :update)
      true
    elsif (@record.pilot == @user) && @record.status.editable?
      true
    end
  end
# TODO: this permission check is also used on the PirepsChannel
# we will need to update that administrative check if this is changed
#
this permission check is also used on the PirepsChannel
we will need to update that administrative check if this is changed
this permission check is also used on the PirepsChannel we will need to update that administrative check if this is changed
def update?
    if @user.can?(Pirep, :update)
      true
    elsif (@record.pilot == @user) && @record.status.editable?
      true
    end
  end
def update? if @user . can? ( Pirep , :update ) true elsif ( @record . pilot == @user ) && @record . status . editable? true end end
TODO: this permission check is also used on the PirepsChannel
we will need to update that administrative check if this is changed
TODO : this permission check is also used on the PirepsChannel we will need to update that administrative check if this is changed