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

Version Path
bullet_train-super_scaffolding-1.10.0 app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb
bullet_train-super_scaffolding-1.9.0 app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb
bullet_train-super_scaffolding-1.8.5 app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb
bullet_train-super_scaffolding-1.8.4 app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb
bullet_train-super_scaffolding-1.8.3 app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb
bullet_train-super_scaffolding-1.8.2 app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb
bullet_train-super_scaffolding-1.8.1 app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb
bullet_train-super_scaffolding-1.8.0 app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb
bullet_train-super_scaffolding-1.7.23 app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb
bullet_train-super_scaffolding-1.7.22 app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb
bullet_train-super_scaffolding-1.7.21 app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb
bullet_train-super_scaffolding-1.7.20 app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb
bullet_train-super_scaffolding-1.7.19 app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb
bullet_train-super_scaffolding-1.7.18 app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb
bullet_train-super_scaffolding-1.7.17 app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb
bullet_train-super_scaffolding-1.7.16 app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb
bullet_train-super_scaffolding-1.7.15 app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb
bullet_train-super_scaffolding-1.7.14 app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb
bullet_train-super_scaffolding-1.7.13 app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb
bullet_train-super_scaffolding-1.7.12 app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb