Nerdgasm

Feb 21, 2008 08:22



Code on pastie.caboo.se

def create
@my_object = MyObject.new(params[:my_object])
@my_object.save! # save or raise an exception
rescue ActiveRecord::RecordInvalid
flash.now[:notice] = 'Invalid record!'
render :action => :new
else
redirect_to my_object_path(@my_object)
flash[:notice] = 'Record created!'
end create is missing ( Read more... )

Leave a comment

Comments 1

ckrazee February 21 2008, 20:19:42 UTC
... You nerds. XD

Reply


Leave a comment

Up