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
test: | |
service: Disk | |
root: <%= Rails.root.join("tmp/storage") %> | |
local: | |
service: Disk | |
root: <%= Rails.root.join("storage") %> | |
# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key) | |
# amazon: | |
# service: S3 | |
# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %> |
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
params.require(:profile).permit(:some_attribute, :some_other_attribute, :avatar) |
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
<%= form.file_field :avatar %> |
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
<%= form.file_field :contracts, multiple: true %> |
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_blob_path(some_profile.avatar, disposition: 'attachment') |
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
params.require(:customer).permit(:some_attribute, :yet_another_attribute, contracts: []) |
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
url_for(some_profile.avatar) |
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
binary_data = some_profile.avatar.download |
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
<%= image_tag profile.avatar.variant(resize_to_limit: [75, 75]) %> |
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
<%= image_tag profile.avatar.variant(resize_to_limit: [75, 75]).processed %> |
OlderNewer