app/controllers/concerns/polymorphic_resource_scope.rb
# All users can create all resources by default,
# to be sure they can create an associated resource we test
# they can update the linked resource instead of :create
# otherwise default to normal behaviour
All users can create all resources by default,
to be sure they can create an associated resource we test
they can update the linked resource instead of :create
otherwise default to normal behaviour
All users can create all resources by default to be sure they can create an associated resource we test they can update the linked resource instead of : create otherwise default to normal behaviour
def controlled_scope
    if action_name == "create"
      :update
    else
      action_name.to_sym
    end
  end
def controlled_scope if action_name == "create" :update else action_name . to_sym end end
All users can create all resources by default,
to be sure they can create an associated resource we test
they can update the linked resource instead of :create
otherwise default to normal behaviour
All users can create all resources by default to be sure they can create an associated resource we test they can update the linked resource instead of : create otherwise default to normal behaviour