Sha256: 60a2fe84a8c2451c22da39722afc385c559b0e2bbd55b50da6e095fc23989ea2
Contents?: true
Size: 740 Bytes
Versions: 101
Compression:
Stored size: 740 Bytes
Contents
module CmAdmin module ViewHelpers module ActionDropdownHelper def available_actions(cm_model, ar_object, action_type) if action_type.eql?('custom_actions') cm_model.available_actions.select { |act| act if act.route_type.eql?('member') && [:button, :modal].include?(act.display_type) && act.name.present? && has_valid_policy(ar_object, act.name) } else cm_model.available_actions.select { |act| act if act.action_type.eql?(:default) && act.name.eql?(action_type) } if has_valid_policy(ar_object, action_type) end end end end end
Version data entries
101 entries across 101 versions & 1 rubygems