refactor(manager data exports): renaming methods
This commit is contained in:
parent
4f0713a764
commit
7cf81d3e9b
4 changed files with 6 additions and 6 deletions
|
@ -40,7 +40,7 @@ module Manager
|
|||
def data_exports
|
||||
end
|
||||
|
||||
def export_last_month
|
||||
def export_last_half_year
|
||||
administrateurs = Administrateur.joins(:user).where(created_at: 6.months.ago..).where.not(users: { email_verified_at: nil })
|
||||
csv = CSV.generate(headers: true) do |csv|
|
||||
csv << ['ID', 'Email', 'Date de création']
|
||||
|
|
|
@ -23,7 +23,7 @@ module Manager
|
|||
redirect_to manager_instructeurs_path
|
||||
end
|
||||
|
||||
def export_last_month
|
||||
def export_last_half_year
|
||||
instructeurs = Instructeur.joins(:user).where(created_at: 6.months.ago..).where.not(users: { email_verified_at: nil })
|
||||
csv = CSV.generate(headers: true) do |csv|
|
||||
csv << ['ID', 'Email', 'Date de création']
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div>
|
||||
<ul>
|
||||
<li><a href="/manager/exports/administrateurs/last_month">Export des administrateurs (6 mois)</a></li>
|
||||
<li><a href="/manager/exports/instructeurs/last_month">Export des instructeurs (6 mois)</a></li>
|
||||
<li><a href="/manager/exports/administrateurs/last_half_year">Export des administrateurs créés dans les 6 derniers mois</a></li>
|
||||
<li><a href="/manager/exports/instructeurs/last_half_year">Export des instructeurs créés dans les 6 derniers mois</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -115,8 +115,8 @@ Rails.application.routes.draw do
|
|||
end
|
||||
|
||||
get 'data_exports' => 'administrateurs#data_exports'
|
||||
get 'exports/administrateurs/last_month' => 'administrateurs#export_last_month'
|
||||
get 'exports/instructeurs/last_month' => 'instructeurs#export_last_month'
|
||||
get 'exports/administrateurs/last_half_year' => 'administrateurs#export_last_half_year'
|
||||
get 'exports/instructeurs/last_half_year' => 'instructeurs#export_last_half_year'
|
||||
|
||||
get 'import_procedure_tags' => 'procedures#import_data'
|
||||
post 'import_tags' => 'procedures#import_tags'
|
||||
|
|
Loading…
Reference in a new issue