7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'app/controllers/decidim/time_tracker/admin/time_tracker_exports_controller.rb', line 7
def export
ExportTimeTracker.call(current_component, current_user) do
on(:ok) do |accountability_component|
flash[:notice] = I18n.t("time_tracker_exports.create.success", scope: "decidim.time_tracker.admin")
redirect_to EngineRouter.admin_proxy(accountability_component).root_path
end
on(:invalid) do
flash.now[:alert] = I18n.t("time_tracker_exports.create.error", scope: "decidim.time_tracker.admin")
redirect_to EngineRouter.admin_proxy(current_component).root_path
end
end
end
|