bigdir/app/controllers/homework_users_controller.rb

15 lines
282 B
Ruby
Raw Permalink Normal View History

class HomeworkUsersController < ApplicationController
#新增数据
def create option
user = HomeworkUser.new option
user.save
user
end
#删除数据
def destory homework_user
user = HomeworkUser.find homework_user
user.destroy
user
end
end