class SchoolMoveExport
Public Class Methods
Source
# File app/models/school_move_export.rb, line 10 def initialize(current_user:, **attributes) @current_user = current_user super(**attributes) end
Calls superclass method
RequestSessionPersistable::new
Public Instance Methods
Source
# File app/models/school_move_export.rb, line 21 def csv_filename name_parts = ["school_moves_export"] name_parts << date_from.to_fs(:govuk) if date_from.present? name_parts << "to" if date_from.present? && date_to.present? name_parts << date_to.to_fs(:govuk) if date_to.present? "#{name_parts.join("_")}.csv" end
Source
# File app/models/school_move_export.rb, line 30 def date_from_formatted if date_from.present? date_from.strftime("%d %B %Y") else "Earliest recorded vaccination" end end
Source
# File app/models/school_move_export.rb, line 38 def date_to_formatted if date_to.present? date_to.strftime("%d %B %Y") else "Latest recorded vaccination" end end
Source
# File app/models/school_move_export.rb, line 15 def wizard_steps %i[dates confirm] end