Skip to content

no implicit conversion of nil into String #1176

Closed
@sarjanen

Description

Got this error on rc3 but not on rc2 and I do not do anything fancy here:

class PostSerializer < ActiveModel::Serializer
  attributes :id
end
class Api::V2::PostsController < ApplicationController
  def index
    post = Post.all

    render json: post
  end
end

Application trace:

app/serializers/post_serializer.rb:1:in `<top (required)>'
app/controllers/api/v2/posts_controller.rb:5:in `index'

I get the same error on every adapter

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions