app/models/part.rb class Part < ActiveRecord::Base def after_create raise "no way" if self.name == "test" end end app/controllers/parts_controller.rb class PartsController < ApplicationController def test Part.create!(:name => "test") end end test/functional ...
open2ye
搜索本博客
我的相册
Ac44ad89-992f-34f7-973c-60b25a6ddc0c-thumb
action_auth
共 26 张
最近加入圈子
存档
最新评论