dmorrill10 / acpc_poker_gui_client

Rails application that allows humans to play poker matches managed by the Annual Computer Poker Competition's Dealer program in a web GUI.
56 stars 37 forks source link

Leading and trailing spaces effect match names in database #1

Open dmorrill10 opened 12 years ago

dmorrill10 commented 12 years ago

This is a problem because the ACPC dealer doesn't treat the spaces the same way. It strips match names (as normally expected), so those coming into the database should do the same.

dmorrill10 commented 12 years ago

Fixed it so that match names will be stripped before being placed in the database and sent to the dealer, but I haven't figured out how to do this before client side validations are done, so to the user, these matches look valid. Mongoid allows before_validation callbacks through ActiveSupport, but I haven't figured out how to do this properly.