Use paperclip destroy function instead of setting object to nil.
This commit is contained in:
@@ -93,7 +93,7 @@ module Budgets
|
||||
end
|
||||
|
||||
def remove_image
|
||||
@investment.image = nil
|
||||
@investment.image.destroy
|
||||
@investment.image_title = nil
|
||||
@investment.save
|
||||
redirect_to budget_investment_path(@investment.budget, @investment),
|
||||
|
||||
Reference in New Issue
Block a user