Sha256: cfee8c9a4f386370ee76d3894064f5bc84dad4d8e63983f8b925134dff5a233e
Contents?: true
Size: 375 Bytes
Versions: 9
Compression:
Stored size: 375 Bytes
Contents
class Avo::ResourceComponent < ViewComponent::Base def can_create? @resource.authorization.authorize_action(:create, raise_exception: false) end def can_delete? @resource.authorization.authorize_action(:destroy, raise_exception: false) end private def simple_relation? @reflection.is_a? ::ActiveRecord::Reflection::HasManyReflection end end
Version data entries
9 entries across 9 versions & 1 rubygems