Sha256: 25d136da93765ac4139c3c0123d82f4b21ea3abf27fcaf40bd68b8dca28f470a
Contents?: true
Size: 967 Bytes
Versions: 3
Compression:
Stored size: 967 Bytes
Contents
# -*- encoding : utf-8 -*- module KirguduBase class AdminController < ::KirguduBase::DynamicPagesController before_action :authenticate_user def current_entry @entry end include KirguduBase::GuiHelper protected rescue_from ActiveRecord::RecordNotFound do @local_data = I18n.t("#{self.to_i18n}.errors.entry_not_found", entry_id: params[:id]) respond_to do |format| format.html { render_redirect self.to_url_for(:index) } format.json { render_json_not_found(message: flash[:error]) } end end protected def before_entry_create(entry, filter_params, options) super(entry, filter_params, options) entry.creator = self.current_user if entry.respond_to?(:creator) entry.updater = self.current_user if entry.respond_to?(:updater) end def before_entry_update(entry, filter_params, options) super(entry, filter_params, options) entry.updater = self.current_user if entry.respond_to?(:updater) end end end
Version data entries
3 entries across 3 versions & 1 rubygems