Skip to content

Commit ead0bc4

Browse files
committed
Migrate pricing rules controller to strong parameters
1 parent 06cf809 commit ead0bc4

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

app/controllers/api/pricing_rules_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,6 @@ def authorize_action
7676
end
7777

7878
def pricing_rule_params
79-
params.require(:pricing_rule)
79+
params.require(:pricing_rule).permit(:min, :max, :cost_per_unit)
8080
end
8181
end

app/models/pricing_rule.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ class PricingRule < ApplicationRecord
55
belongs_to :plan
66
belongs_to :metric
77

8-
attr_protected :metric_id, :plan_id, :plan_type, :tenant_id, :audit_ids
9-
108
# TODO: add validations that check that the intervals are well defined. TODO:
119
# min must be always > 0
1210
#

0 commit comments

Comments
 (0)