Skip to content

Commit 732c2f3

Browse files
committed
rename function
1 parent 01c5174 commit 732c2f3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/controllers/v3/service_instances_controller.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def create_user_provided(message)
255255
def create_managed(message, space:)
256256
service_plan = ServicePlan.first(guid: message.service_plan_guid)
257257
unprocessable_service_plan! unless service_plan_valid?(service_plan)
258-
service_plan_not_visible_in_space! unless resource_exists_in_space?(service_plan, space)
258+
service_plan_not_visible_in_space! unless service_plan_exists_in_space?(service_plan, space)
259259

260260
action = V3::ServiceInstanceCreateManaged.new(user_audit_info, message.audit_hash)
261261
VCAP::CloudController::ManagedServiceInstance.db.transaction do
@@ -397,10 +397,10 @@ def admin?
397397

398398
def service_plan_valid?(service_plan)
399399
service_plan &&
400-
visible_to_current_user?(plan: service_plan)
400+
visible_to_current_user?(plan: service_plan)
401401
end
402402

403-
def resource_exists_in_space?(service_plan, space)
403+
def service_plan_exists_in_space?(service_plan, space)
404404
service_plan.visible_in_space?(space)
405405
end
406406

@@ -409,7 +409,7 @@ def raise_if_invalid_service_plan!(service_instance, message)
409409

410410
service_plan = ServicePlan.first(guid: message.service_plan_guid)
411411
unprocessable_service_plan! unless service_plan_valid?(service_plan)
412-
service_plan_not_visible_in_space! unless resource_exists_in_space?(service_plan, service_instance.space)
412+
service_plan_not_visible_in_space! unless service_plan_exists_in_space?(service_plan, service_instance.space)
413413
invalid_service_plan_relation! unless service_plan.service == service_instance.service
414414
end
415415

0 commit comments

Comments
 (0)