You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/controllers/admins/agreements_controller.rb

18 lines
327 B

class Admins::AgreementsController < Admins::BaseController
def edit
current_doc
end
def update
current_doc.update!(agreement: params[:agreement])
flash[:success] = '保存成功'
redirect_to edit_admins_agreement_path
end
private
def current_doc
@doc ||= Help.first || Help.create
end
end