forgeplus/app/controllers/admins/abouts_controller.rb

18 lines
317 B
Ruby
Raw Normal View History

2020-03-09 00:40:16 +08:00
class Admins::AboutsController < Admins::BaseController
def edit
current_doc
end
def update
current_doc.update!(about_us: params[:about_us])
flash[:success] = '保存成功'
redirect_to edit_admins_about_path
end
private
def current_doc
@doc ||= Help.first || Help.create
end
end