app/controllers/tramway/event/events_controller.rb in tramway-event-1.2.1 vs app/controllers/tramway/event/events_controller.rb in tramway-event-1.2.2

- old
+ new

@@ -4,9 +4,9 @@ def show @event = ::Tramway::Event::EventDecorator.decorate ::Tramway::Event::Event.find params[:id] class_name = "ParticipantExtendedForm#{request.uuid.gsub('-', '')}" form_class = ::Tramway::Core::ExtendableForm.new(class_name, *@event.participant_form_fields.inputs_list.map(&:title).map(&:to_sym)) @participant_form = form_class.new ::Tramway::Event::Participant.new - @sections_as_features = @event.sections.map { |s| ::Tramway::Event::SectionFeatureDecorator.decorate s } - @sections = @event.sections.map { |s| ::Tramway::Event::SectionDecorator.decorate s } + @sections_as_features = @event.sections.order(position: :asc).map { |s| ::Tramway::Event::SectionFeatureDecorator.decorate s } + @sections = @event.sections.order(position: :asc).map { |s| ::Tramway::Event::SectionDecorator.decorate s } end end