-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Csv Import Status and Errors (#1102)
* add class Data to import for status/feedback * add tests * clean up * standard fix * use clearing naming and use with_index * add upload limit concern * update concern
- Loading branch information
Showing
5 changed files
with
79 additions
and
22 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module AttachmentManageable | ||
def allow_only_one_attachment | ||
return unless params[:files].is_a?(Array) | ||
|
||
flash.now[:alert] = t(".upload_limit_exceed") | ||
render turbo_stream: turbo_stream.replace("flash", partial: "layouts/shared/flash_messages") | ||
end | ||
end |
18 changes: 11 additions & 7 deletions
18
app/controllers/organizations/staff/external_form_upload_controller.rb
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
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
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
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