init project

This commit is contained in:
Jasder
2020-03-09 00:40:16 +08:00
commit 2937b2a94d
6549 changed files with 7215173 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
class Admins::ContactUsController < Admins::BaseController
def edit
@cooperations = Cooperation.all.group(:user_type)
@help = Help.first
end
def update
cooperation = Cooperation.find(params[:id])
cooperation.update!(update_cooperation_params)
flash[:success] = '保存成功'
redirect_to edit_admins_contact_us_path
end
def update_address
help = Help.first || Help.create
help.update!(status: params.dig('help', 'status'))
flash[:success] = '保存成功'
redirect_to edit_admins_contact_us_path
end
private
def update_cooperation_params
params.require(:cooperation).permit(:name, :qq, :mail)
end
end