Posts by Rafael Oliveira • 176 points
3 posts
-
1
votes1
answer316
viewsA: Update User Devise via API Securely
I recommend you take an approach with a TOKEN for user authentication via API (note that it is not related to the old Tokenauthenticable of Devise). Your User model will have one TOKEN which will be…
ruby-on-railsanswered Rafael Oliveira 176 -
1
votes2
answers195
viewsA: Carrierwave - destroy object only after it has been deleted from my storage
What I did was call remove_avatar! before calling super() and do the removal indeed, without changing anything in the callbacks. For registration, follow the code of the Concern: #…
-
4
votes2
answers195
viewsQ: Carrierwave - destroy object only after it has been deleted from my storage
Carrierwave only deletes the 'mounted' file after the object in the database has been removed: after_commit :remove_avatar! :on => :destroy https://github.com/carrierwaveuploader/carrierwave I am…