socialforge/app/models/first_page.rb

9 lines
478 B
Ruby
Raw Normal View History

class FirstPage < ActiveRecord::Base
2014-07-16 15:32:27 +08:00
attr_accessible :description, :title, :web_title,:page_type,:sort_type
validates_presence_of :web_title, :title, :description,:page_type
validates_length_of :web_title,:title, maximum: 30
validates_inclusion_of :image_width,:in => 50..120, :message => l(:image_width_error_message)
validates_inclusion_of :image_height,:in => 50..80, :message => l(:image_height_error_message)
2014-07-25 10:01:02 +08:00
#validates_length_of :description, maximum: 100
end