21 lines
495 B
Ruby
21 lines
495 B
Ruby
class Admin::ActiveAgreementsController < OrbitAdminController
|
|
|
|
def initialize
|
|
super
|
|
@app_title = 'active'
|
|
end
|
|
|
|
def index
|
|
@active_agreement = ActAgreement.first || ActAgreement.create
|
|
@url = admin_active_agreement_path(@active_agreement)
|
|
end
|
|
|
|
def update
|
|
@active_agreement = ActAgreement.first
|
|
@active_agreement.update_attributes(params.require(:act_agreement).permit!)
|
|
|
|
redirect_to admin_active_agreements_path, notice: t('act.save_success')
|
|
end
|
|
|
|
end
|