mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
Fix for tag remove issues
This commit is contained in:
parent
1d08832948
commit
bba781c5be
1 changed files with 4 additions and 1 deletions
|
@ -16,7 +16,10 @@ post '/tags/remove' do
|
|||
|
||||
if params[:tags].is_a?(Array)
|
||||
DB.transaction {
|
||||
params[:tags].each {|tag| current_site.remove_tag Tag[name: tag]}
|
||||
params[:tags].each do |tag|
|
||||
tag_to_remove = current_site.tags.select {|t| t.name == tag}.first
|
||||
current_site.remove_tag(tag_to_remove) if tag_to_remove
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue