gayle / two_tents

[If you start working on an issue, please assign it to yourself so others know that issue is in progress.] - [If you finish an issue, please tag it Fixed so that user acceptance testing can be performed. The issue will be closed by the tester.]
14 stars 6 forks source link

Increase size of note field #159

Open gayle opened 12 years ago

gayle commented 12 years ago

Having trouble saving large note fields. See below for a specific example of some text that did not fit and caused an error. Fix is to a) increase the size of the field b) and maybe also show some indication of how much space is available in that field. Either just by putting it in words above or below the text box, or javascriptally showing the user how much space is left as they type.

Email from user:

I have an issue with the note area on top of the family page. I think I need more characters added. Wanting to make notes of the family members not coming to camp and cannot put Nick and Seth in on Becky Walkers page. This is what I get.

There was a problem saving the family 'Walker and Belmore and Shofner' [TECHNICAL DETAILS: Tech message: ActiveRecord::StatementInvalid Exception: PGError: ERROR: value too long for type character varying(255) : UPDATE "families" SET "note" = 'Nick finished his first year of college in April and will be working this summer. He is sorry he won''t be at camp but says hello to everyone. Seth will be going on a Mission Trip with his Church Youth Group this week so will not be at camp. He is sorry to miss seeing his friends and hopes to be back next year.' WHERE "id" = 22 /app/.bundle/gems/ruby/1.8/gems/activerecord-2.3.9/lib/active_record/connection_adapters/abstract_adapter.rb:227:in log' /app/.bundle/gems/ruby/1.8/gems/activerecord-2.3.9/lib/active_record/connection_adapters/postgresql_adapter.rb:520:inexecute']


al2o3cr commented 12 years ago

Changing the column type to :text instead of :string will clear this up immediately:

http://archives.postgresql.org/pgsql-novice/2002-02/msg00098.php

gayle commented 9 years ago

Change trivia field on participants table to :text also, see #145