Rails add user avatar using api in active storage.

in controller:- @user.avatar.attach(params[:avatar])


in model:-has_one_attached :avatar

Leave a Comment

Your email address will not be published. Required fields are marked *