-
Notifications
You must be signed in to change notification settings - Fork 14
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
GenericWorks should have a .generic_file_ids= setter method #208
Comments
Keep in mind that the ids setter isn't going to get you much. It'll still have to do a find on each of the ids so that it can run the type_validator on each member. |
Ah. So maybe it's a moot point for tomorrow's work. I was hoping to avoid loading the objects before saving the new order. |
My use case is for reordering page images within books that sometimes have On Tuesday, September 8, 2015, Justin Coyne [email protected]
|
Yeah, I think you want to make a special function for that. Maybe |
I think this translates into a feature request for AF::Aggregation, but the request only makes sense with an example. This is the example.
Use case: changing the order of generic_files within a generic_work
Currently I have to
I get an error if I try to call
book.generic_file_ids = page_ids
, even though that's where I got the ids.Note that generic_file_ids is a filtered subset of member_ids, so the code sample here actually risks accidentally removing other members from book.members.
Of course, I could always use member_ids for both getter and setter but that violates the whole reason for having the generic_file_ids method in the first place.
The text was updated successfully, but these errors were encountered: