Sha256: 3fc8b4f0bd78d65f83f7e6d0c590a29fdd0138ecf1ce2a3faf514133713ee96b
Contents?: true
Size: 1.02 KB
Versions: 21
Compression:
Stored size: 1.02 KB
Contents
# frozen_string_literal: true # generado con pg_rails class AccountDecorator < PgEngine::BaseRecordDecorator delegate_all # Define presentation-specific methods here. Helpers are accessed through # `helpers` (aka `h`). You can override attributes, for example: # # def created_at # helpers.content_tag :span, class: 'time' do # object.created_at.strftime("%a %m/%d/%y") # end # end def extra_actions(*) return if Current.namespace == :admin ua = Current.user.user_account_for(object).decorate [ua.ingresar_link, ua.accept_invitation_link, ua.reject_invitation_link].compact.join.html_safe end def show_link(text: nil, klass: 'btn-secondary') return unless Pundit.policy!(Current.user, object).show? text = 'Usuarios' # rubocop:disable Lint/ShadowedArgument helpers.content_tag :span do helpers.link_to object_url, class: "btn btn-sm #{klass}" do helpers.content_tag(:span, nil, class: clase_icono('person')) + text end end end end
Version data entries
21 entries across 21 versions & 1 rubygems