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.36 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.35 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.34 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.33 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.32 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.31 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.30 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.29 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.28 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.27 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.26 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.25 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.24 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.23 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.22 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.21 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.20 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.19 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.18 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb
pg_rails-7.0.8.pre.alpha.17 pg_scaffold/lib/generators/pg_pundit/templates/policy.rb