rosa-build/app/helpers/avatar_helper.rb

8 lines
175 B
Ruby
Raw Permalink Normal View History

module AvatarHelper
def update_avatar(subject, params)
if subject.avatar && params[:delete_avatar] == '1'
subject.avatar = nil
subject.save
end
end
end