Sha256: 36a3b502116f3baf28caead24fafbca0cad65a4b5eeb060ee643500c1e927011

Contents?: true

Size: 683 Bytes

Versions: 53

Compression:

Stored size: 683 Bytes

Contents

# frozen_string_literal: true

# generado con pg_rails

<% if namespaced? -%>
require_dependency "<%= namespaced_path %>/application_policy"

<% end -%>
<% module_namespacing do -%>
class <%= class_name %>Policy < ApplicationPolicy
  class Scope < ApplicationPolicy::Scope
    # def resolve
    #   if policy.acceso_total?
    #     scope.all
    #   else
    #     scope.none
    #   end
    # end
  end

  # def puede_editar?
  #   acceso_total? && !record.readonly?
  # end

  # def puede_crear?
  #   acceso_total? || user.asesor?
  # end

  # def puede_borrar?
  #   acceso_total? && !record.readonly?
  # end

  # def acceso_total?
  #   user.developer?
  # end
end
<% end -%>

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
pg_rails-7.0.8.pre.alpha.56 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.55 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.54 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.53 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.52 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.51 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.50 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.49 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.48 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.47 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.46 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.45 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.44 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.43 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.42 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.41 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.40 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.39 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.38 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.37 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb