Class: Flexite::HistoriesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Flexite::HistoriesController
- Defined in:
- app/controllers/flexite/histories_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
5 6 7 |
# File 'app/controllers/flexite/histories_controller.rb', line 5 def index @histories = History.includes(:history_attributes).where(entity_id: params[:entity_id], entity_type: params[:entity_type].camelize) end |
#restore ⇒ Object
9 10 11 12 |
# File 'app/controllers/flexite/histories_controller.rb', line 9 def restore History.includes(:history_attributes).find(params[:id]).restore flash[:success] = 'Entity was restored from history' end |