Document update question?

Thank you for your shrine gem and the amazing documentation.

Consider this file here:

https://github.com/shrinerb/shrine/blob/master/doc/multiple_files.md#4a-form-upload

This is for form uploads of multiple files. I have reproduced it here for your convenience:

# In your controller:

# transform the list of uploaded files into a photos attributes hash
new_photos_attributes = params[:files].inject({}) do |hash, file|
  hash.merge!(SecureRandom.hex => { image: file })
end

# merge new photos attributes with existing (`album_params` is whitelisted `params[:album]`)
photos_attributes = album_params[:photos_attributes].to_h.merge(new_photos_attributes)
album_attributes  = album_params.merge(photos_attributes: photos_attributes)

# create the album with photos
Album.create(album_params)

Shouldn’t the code rather be:

> Album.create(album_attributes) # album_attributes NOT album_params

Please do confirm.

If that’s the case, then I can easily put in a PR.

Good catch, yes, it should be album_attributes, a PR would be appreciated :pray:

Thank you for your shrine gem and the amazing documentation.

You’re welcome :heart:

Good catch, yes, it should be album_attributes , a PR would be appreciated

I made the PR.