# -*- encoding : utf-8 -*- module KirguduBase class FacadeController < ::KirguduBase::ApplicationController #before_action :authenticate_user layout "/layouts/application" def left_menu_path "/admin/kirgudu_base/left_menu" end def current_entry @entry end include GuiHelper protected rescue_from ActiveRecord::RecordNotFound do flash[:error] = I18n.t("#{self.to_i18n}.entry_not_found", entry_id: params[:id]) respond_to do |format| format.html { render_redirect url_for(action: 'index') } format.json { render_json_not_found(message: flash[:error]) } end end private def before_entry_create(entry, filter_params, options) entry.creator = @current_user entry.updater = @current_user end def before_entry_update(entry, filter_params, options) entry.updater = @current_user end end end