Sha256: de0ee7e54d884e6e88bcf386724386e9f2e173e80e3ad29032d1dce1ee35f65a
Contents?: true
Size: 470 Bytes
Versions: 18
Compression:
Stored size: 470 Bytes
Contents
require_dependency 'flexite/application_controller' module Flexite class HistoriesController < ApplicationController def index @histories = History .includes(:history_attributes) .where(entity_id: params[:entity_id], entity_type: params[:entity_type].camelize) end def restore History.includes(:history_attributes).find(params[:history_id]).restore flash[:success] = 'Entity was restored from history' end end end
Version data entries
18 entries across 18 versions & 1 rubygems