-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Change how line item options are allowed in line items controller #1943
Conversation
|
||
context 'when the line items have custom attributes' do | ||
it "can create an order with line items that have custom permitted attributes" do | ||
PermittedAttributes.line_item_attributes << {options: [:some_option] } |
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.
Space inside { missing.
This looks good to me, but needs a changelog entry for people who have overridden or used that class attribute. Also, would you mind squashing the Hound appeasement into the previous commit? |
@mamhoff Changelog updated and commits squashed! :) |
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.
Looks goot to me. @jhawthorn would you mind evaluating this PR?
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.
Thanks!
Thanks, looking forward to trying this out! |
#1131
Don't really know if this is the right way.. but old logic and issue reported seemed confusing to me, apparently it was just a bad setup of permitted attributes.
I just had the line items controller changed to make more sense, and got rid of that class attribute.
Permitted controllers are working now, old test are still green and I added a new test to confirm that orders are being created properly with line items with options.