#會顯示出字串"foo"
<%= some_variable ="foo"%>
#不會顯示字串"foo"
<% some_variable ="foo"%>

 

#cost初始值要>(大於)0
validates_numericality_of :cost, :greater_than => 0 
相关文章