alum tag save fix
This commit is contained in:
parent
dc7710cc65
commit
6baec3ce6a
|
@ -189,7 +189,7 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
|||
@album = Album.find(params[:id])
|
||||
tagsToDestroy = []
|
||||
tagsToAdd = []
|
||||
new_tags = params[:album][:tag_ids]
|
||||
new_tags = params[:album][:tag_ids] || []
|
||||
old_tags = @album.tagged_ids
|
||||
old_tags.each do |tag|
|
||||
if !new_tags.include?(tag)
|
||||
|
@ -204,6 +204,7 @@ class Panel::Gallery::BackEnd::AlbumsController < OrbitBackendController
|
|||
end
|
||||
end
|
||||
update_children_image_tag(tagsToDestroy,tagsToAdd)
|
||||
params[:album][:tag_ids] = params[:album][:tag_ids] || []
|
||||
@album.update_attributes(params[:album])
|
||||
redirect_to panel_gallery_back_end_album_path(@album)
|
||||
end
|
||||
|
|
Reference in New Issue