diff --git a/.rubocop.yml b/.rubocop.yml index 50c780c9089f087ae0276be81246a0eb963254b8..3f8285590943a97fd5bad8d9e28dbda759bfd0af 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -96,6 +96,9 @@ Style/DoubleNegation: EnforcedStyle: allowed_in_returns Enabled: false +Style/ParallelAssignment: + Enabled: false + Style/PerlBackrefs: Enabled: false diff --git a/lib/customer_plan.rb b/lib/customer_plan.rb index b63230867b5bc1dfc532ee96ea1b7ae20b680aa9..d3c51aef0323a986739b06583f1a331807f3b7bd 100644 --- a/lib/customer_plan.rb +++ b/lib/customer_plan.rb @@ -53,6 +53,7 @@ class CustomerPlan end def initialize(customer_id=nil, **kwargs) + kwargs, customer_id = customer_id, nil if customer_id.is_a?(Hash) kwargs[:plan] = kwargs.delete(:plan_name) if kwargs.key?(:plan_name) super(customer_id ? kwargs.merge(customer_id: customer_id) : kwargs) end