Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

NoMethodError in after callback inside Grape::Middleware::Formatter

Đang mở
#2,139 14 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
ruby
Lĩnh vực
api

Hướng nghiên cứu

Start with Grape::Middleware::Formatter and reproduce the NoMethodError using the status(200) response shown in the issue. Trace the failing after callback and establish the expected response behavior; done means the reported error is reproduced, its cause is identified, and the behavior is covered by an appropriate regression test.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug?

I am getting Grape::Middleware::Formatter : undefined method `collect' for #<Stream:0x00007f685ce13270>
My code works fine, I have tested each line by my hand but if I run the whole API this error appears.
My code is as follow

        @stream = Stream.new(stream_params)
        @stream.location_id = get_location
        @stream.user_id = @streamer.id
        @stream.university = @university
        @stream.category = @category
        @stream.save!
        status(200){
          'message': 'successfully created the stream request'
        }
Ngôn ngữ chính
Ruby
Star
10k
Fork
1.2k
Merge trung bình
14 giờ 9 phút
Pull request đã merge (30 ngày)
96

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ruby-grape/grape

Tất cả issue của ruby-grape/grape

Issue tương tự

Thêm issue về Ruby

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.