FIX: Don't allow profile bios longer than 3k chars

This commit is contained in:
Robin Ward
2014-09-08 15:17:31 -04:00
parent f2cca140b4
commit 56eda5abf9
9 changed files with 36 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
class UserProfile < ActiveRecord::Base
belongs_to :user, inverse_of: :user_profile
validates :bio_raw, length: { maximum: 3000 }
validates :user, presence: true
before_save :cook
after_save :trigger_badges