Skip to content
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

Incompatible LineItem option permitting between Api::OrdersController and Api::LineItemsController #1131

Closed
deodad opened this issue May 10, 2016 · 2 comments

Comments

@deodad
Copy link
Contributor

deodad commented May 10, 2016

Unable to create a new order with a line item with options. This is the issue/motivation behind #1112.

To reproduce:

Start by permitting a new option on to permitted on a line item:

PermittedAttributes.line_item_attributes << :some_option

Now each of the requests should create the line item with some_option set to 4:

To OrdersController#create

{ order: { line_items: [variant_id: 1, quantity:1, options: { some_option: 4 } ] } }

To LineItemsController#create

{ line_item: variant_id: 1, quantity:1, options: { some_option: 4 } }

However, the OrdersController fails to permit the option.

@gus4no
Copy link

gus4no commented May 22, 2017

Working on it 👷

@deodad
Copy link
Contributor Author

deodad commented Oct 24, 2017

This was fixed by @gus4no

@deodad deodad closed this as completed Oct 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants