diff --git a/app/models/user_extensions.rb b/app/models/user_extensions.rb index d9a0f520a..726918729 100644 --- a/app/models/user_extensions.rb +++ b/app/models/user_extensions.rb @@ -12,6 +12,8 @@ class UserExtensions < ActiveRecord::Base belongs_to :user belongs_to :school, :class_name => 'School', :foreign_key => :school_id attr_accessible :user_id,:birthday,:brief_introduction,:gender,:location,:occupation,:work_experience,:zip_code,:identity, :technical_title,:student_id + validates_length_of :description, :maximum => 255 + validates_length_of :brief_introduction, :maximum => 255 TEACHER = 0 STUDENT = 1 ENTERPRISE = 2 diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index f17f0306f..580ddf773 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -17,7 +17,7 @@
<% if( @act.nil? || @act != 'password') %> <%= render_flash_messages %> - <%= error_messages_for 'user' %> + <%= error_messages_for 'user',@user.user_extensions %> <% end %>