Skip to content

Commit

Permalink
fix: resource doesn't update if file attached (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianthedev authored Aug 11, 2020
1 parent 85914d7 commit 1253f7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/avo/resources_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def update

# Filter out the file params
regular_resource_params = resource_params.select do |id, value|
!avo_resource.attached_file_fields.map(&:id).include? id
!avo_resource.attached_file_fields.map(&:id).to_s.include? id
end

if avo_resource.has_devise_password and regular_resource_params[:password].blank?
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/js/components/Edit/FileField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<a-button color="indigo"
@click="deleteFile"
v-if="value"
><trash-icon class="h-4 mr-1" /> Delete {{field.filename}}</a-button>
><trash-icon class="h-4 mr-1" /> Delete file</a-button>
</template>
</edit-field-wrapper>
</template>
Expand Down

0 comments on commit 1253f7d

Please sign in to comment.