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

20 lines
582 B
Ruby
Raw Normal View History

2014-10-02 06:00:35 +00:00
class Admin::AskAcknowledgementsController < OrbitAdminController
2020-04-30 05:18:02 +00:00
helper Admin::AsksHelper
2014-10-02 06:00:35 +00:00
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