-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VEN-99 Add brakeman #59
Conversation
@damianlegawiec Does not run at all |
For https://codeclimate.com/github/spree/spree_backend/app/controllers/spree/admin/promotion_actions_controller.rb?from_sha=31a4e70c&to_sha=fc8404a7 we need to eager load all promotion actions (in development environment) for being able to search Spree::PromotionAction.descendants, and not .constantize the :action_type parameter directly. In other environments they will be loaded automatically. |
@@ -49,6 +49,6 @@ def validate_promotion_rule_type | |||
end | |||
|
|||
def promotion_rule_params | |||
params[:promotion_rule].permit! | |||
params[:promotion_rule].permit(:type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aleksandarpetrushev what about user_id
or product_group_id
attributes for this model? or preferences?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@damianlegawiec we have a similar situation such as in payment_methods_controller. promotion_rules_controller is used only for #create and #destroy. When creating a promotion rule, we know the type only. The additional attributes are sent in PromotionsController#update as nested "promotion_rules_attributes", after the promotion rules have been created. Tested for all promotion rules, only the type is sent.
@aleksandarpetrushev I see there are still 7 issues listed by CC - what's the plan for them? |
@damianlegawiec
|
@damianlegawiec So to sum it up we have 5 issues left:
So how should we proceed? |
d1dc270
to
d0b6380
Compare
21fd767
to
8166695
Compare
8166695
to
020e690
Compare
Continues at #106 |
No description provided.