:if :unless. "step" , , .
class Item < ActiveRecord::Base
validates_presence_of :name
validates_presence_of :category_id, :if => Proc.new { |i| i.step >= 2 }
validates_presence_of :description, :if => Proc.new { |i| i.step >= 3 }
end
.
def update
@item = Item.find(params[:id])
@item.step += 1
if @item.update_attributes(params[:item])
end
end
.