Sha256: 1e350e4f86bce3474d2078ca231c953cb12d3b478151b07959d4df8e5397d8b0

Contents?: true

Size: 259 Bytes

Versions: 1

Compression:

Stored size: 259 Bytes

Contents

class <%= @name.camelize %>Policy < ApplicationPolicy
  
  def new?
    true
  end

  def edit?
    user == record.user
  end

  alias_method :create?, :new?

  alias_method :show?, :new?

  alias_method :update?, :edit?

  alias_method :destroy?, :edit?
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
myrails-7.0.0 lib/myrails/templates/rails/app/policies/pundit.rb