Sha256: 5a44e8e75bd316f069183fd2637a70c0f18c88363c40808c8697c6bc635f8257
Contents?: true
Size: 969 Bytes
Versions: 17
Compression:
Stored size: 969 Bytes
Contents
# -*- encoding : utf-8 -*- module KirguduBase class AdminController < ::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 KirguduBase::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 protected def before_entry_create(entry, filter_params, options) entry.creator = @current_user if entry.respond_to?(:creator) entry.updater = @current_user if entry.respond_to?(:updater) end def before_entry_update(entry, filter_params, options) entry.updater = @current_user if entry.respond_to?(:updater) end end end
Version data entries
17 entries across 17 versions & 1 rubygems