seminar2/app/controllers/admin/seminar_agreements_controll...

21 lines
523 B
Ruby
Raw Permalink Normal View History

2016-06-29 06:57:45 +00:00
class Admin::SeminarAgreementsController < OrbitAdminController
def initialize
super
@app_title = 'seminar'
end
def index
@seminar_agreement = SeminarAgreement.first || SeminarAgreement.create
@url = admin_seminar_agreement_path(@seminar_agreement)
end
def update
@seminar_agreement = SeminarAgreement.first
@seminar_agreement.update_attributes(params.require(:seminar_agreement).permit!)
redirect_to admin_seminar_agreements_path, notice: t('seminar.save_success')
end
end