Class: RailsSyncAdmin::SyncAuditsController
- Inherits:
-
BaseController
- Object
- BaseController
- RailsSyncAdmin::SyncAuditsController
- Defined in:
- app/controllers/rails_sync_admin/sync_audits_controller.rb
Instance Method Summary collapse
Instance Method Details
#apply ⇒ Object
25 26 27 28 |
# File 'app/controllers/rails_sync_admin/sync_audits_controller.rb', line 25 def apply @sync_audit.apply_changes redirect_to admin_sync_audits_url, notice: 'Sync audit was successfully applied.' end |
#batch ⇒ Object
17 18 19 20 |
# File 'app/controllers/rails_sync_admin/sync_audits_controller.rb', line 17 def batch AuditApplyJob.perform_later params[:synchro_type] redirect_to admin_sync_audits_url, notice: 'Batch Apply Sync Run successfully in backend' end |
#destroy ⇒ Object
30 31 32 33 |
# File 'app/controllers/rails_sync_admin/sync_audits_controller.rb', line 30 def destroy @sync_audit.destroy redirect_to admin_sync_audits_url, notice: 'Sync audit was successfully destroyed.' end |
#index ⇒ Object
4 5 6 7 8 |
# File 'app/controllers/rails_sync_admin/sync_audits_controller.rb', line 4 def index q_params = params.permit(:synchro_type, :state, :operation) @sync_audits = SyncAudit.default_where(q_params).order(id: :desc).page(params[:page]) @synchro_types = RailsSync.synchro_types.uniq | SyncAudit.synchro_types end |
#show ⇒ Object
22 23 |
# File 'app/controllers/rails_sync_admin/sync_audits_controller.rb', line 22 def show end |
#sync ⇒ Object
10 11 12 13 14 15 |
# File 'app/controllers/rails_sync_admin/sync_audits_controller.rb', line 10 def sync @synchro_model = params[:synchro_type].constantize @synchro_model.cache_all_diffs redirect_to admin_sync_audits_url, notice: 'Sync Run successfully ' end |