Sha256: 3e941d50067fab014183e0da302c7c4598ad5ab327d7b0dd2942b36b5ddcf735
Contents?: true
Size: 402 Bytes
Versions: 189
Compression:
Stored size: 402 Bytes
Contents
module Scaffolding::AbsolutelyAbstract::CreativeConcepts::ControllerSupport extend ActiveSupport::Concern def ensure_current_user_can_manage_creative_concept(creative_concept) unless can? :manage, creative_concept collaborator = creative_concept.collaborators.find_or_create_by(membership: current_membership) collaborator.roles << :admin collaborator.save end end end
Version data entries
189 entries across 189 versions & 2 rubygems