Sha256: c06846a68a0ff06ea7143f9041ca3ee764f4745bd30b6c2e7f51753f2087be4f
Contents?: true
Size: 462 Bytes
Versions: 42
Compression:
Stored size: 462 Bytes
Contents
module Locomotive module MembershipsHelper def options_for_membership_roles(membership) current_role = membership.role [].tap do |options| Locomotive::Membership::ROLES.each do |role| membership.role = role if policy(membership).change_role? options << [t("locomotive.memberships.roles.#{role}"), role.to_s] end end membership.role = current_role end end end end
Version data entries
42 entries across 42 versions & 1 rubygems