Rails error is 'You need to supply at least one validation'.

woaigithub · 2012年11月02日 · 2573 次阅读

error is 'You need to supply at least one validation'.

class Comment < ActiveRecord::Base attr_accessible :content, :title, :commenter, :email, :url

belongs_to :post

validates :content, :presence => true, :length => 10..200 end

暂无回复。
需要 登录 后方可回复, 如果你还没有账号请 注册新账号