Last active
June 27, 2019 15:26
-
-
Save Alacrity01/120885fbb02e7147efe9e1e3e0d44ccc to your computer and use it in GitHub Desktop.
Week 10, Day 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rails active_storage:install | |
rake db:migrate | |
||in the model|| | |
has_one_attached :avatar <- can call it anything (e.g. image) | |
json.array! @profiles.each do |profile| | |
json.name profile.name | |
json.avatar rails_blob_url(profile.avatar) if profile.avatar.attachment | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment