ask/app/controllers/admin/ask_acknowledgements_contro...

19 lines
555 B
Ruby

class Admin::AskAcknowledgementsController < OrbitAdminController
def initialize
super
@app_title = 'ask_acknowledgement'
end
def index
@ask_acknowledgements = AskAcknowledgement.first || AskAcknowledgement.create
@url = admin_ask_acknowledgement_path(@ask_acknowledgements)
end
def update
@ask_acknowledgements = AskAcknowledgement.first
@ask_acknowledgements.update_attributes(params.require(:ask_acknowledgement).permit!)
redirect_to admin_ask_acknowledgements_path, notice: t('ask.save_success')
end
end