foodcoops / foodsoft

Web-based software to manage a non-profit food coop (product catalog, ordering, accounting, job scheduling).
https://foodcoops.net/
Other
326 stars 146 forks source link

Allow longer bank account descriptions #1062

Closed kidhab closed 3 months ago

kidhab commented 6 months ago

We recently got the following error:

An ActiveRecord::ValueTooLong occurred in bank_accounts#create:

Mysql2::Error: Data too long for column 'description' at row 1: INSERT INTO `bank_accounts` (`name`, `iban`, `description`) VALUES (...)
app/controllers/admin/bank_accounts_controller.rb:11:in `create'

Obviously someone tried to enter a long description for the bank account. At the moment the database field is of the type varchar(255). This MR allows to enter longer descriptions.

yksflip commented 5 months ago

hey kidhab, thanks for this MR! I think rubocop fails because there is a superfluous , in https://github.com/foodcoops/foodsoft/pull/1062/files#diff-28eff7cc0ab79d26401c7885e1ccb6dbb24c4ec0538e436071b48b060a8820c7R3 besides that, we can merge this. Additionally we could write a test for the name / iban field, I'm unsure if there is a validation for those, we might want to have that too ..