title: Rails: User info not updating (Rendered ActiveModel Serializer Null with Hash)
body: <p>The same code is working in the local but not working in Heroku </p>
  
  <pre><code>def update
      current_user.update!(user_params)
      response = { message: Message.account_updated}
      json_response(response)
  end
  private
  def user_params
      params.permit(:first_name, :last_name, :email, :password)
  end
  </code></pre>
  
  <p>routes.rb</p>
  
  <pre><code>namespace :api do
      namespace :v1 do
          put 'user/update', to: 'users#update'
      end
  end
  </code></pre>
  
  <p>user_serializer.rb</p>
  
  <pre><code>class UserSerializer &lt; ActiveModel::Serializer
      attributes :id, :username, :first_name, :last_name, :email, :created_at, :updated_at
  end
  </code></pre>
  
  <p>that is my and it's working on my local via Postman, that is for updating user info, but while I push to Heroku and try to update via Postman then not working, log showing like this</p>
  
  <pre><code>2018-04-30T10:15:47.665731+00:00 heroku[router]: at=info method=PUT path="/api/v1/user/update?first_name=John&amp;last_name=Doe" host=my-host.herokuapp.com request_id=79a84b63-be87-46f8-8fad-2d151a63722f fwd="27.147.231.22" dyno=web.1 connect=0ms service=18ms status=500 bytes=283 protocol=https
  2018-04-30T10:15:47.648979+00:00 app[web.1]: [79a84b63-be87-46f8-8fad-2d151a63722f] Started PUT "/api/v1/user/update?first_name=John&amp;last_name=Doe" 
  for 27.147.231.22 at 2018-04-30 10:15:47 +0000
  2018-04-30T10:15:47.650866+00:00 app[web.1]: [79a84b63-be87-46f8-8fad-2d151a63722f] Processing by Api::V1::UsersController#update as */*
  2018-04-30T10:15:47.650987+00:00 app[web.1]: [79a84b63-be87-46f8-8fad-2d151a63722f]   Parameters: {"first_name"=&gt;"John", "last_name"=&gt;"Doe"}
  2018-04-30T10:15:47.654619+00:00 app[web.1]: [79a84b63-be87-46f8-8fad-2d151a63722f]   User Load (1.3ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2  [["id", 1], ["LIMIT", 1]]
  2018-04-30T10:15:47.656446+00:00 app[web.1]: [79a84b63-be87-46f8-8fad-2d151a63722f]   CACHE User Load (0.0ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2  [["id", 1], ["LIMIT", 1]]
  2018-04-30T10:15:47.658345+00:00 app[web.1]: [79a84b63-be87-46f8-8fad-2d151a63722f]    (1.1ms)  BEGIN
  2018-04-30T10:15:47.661446+00:00 app[web.1]: [79a84b63-be87-46f8-8fad-2d151a63722f]   User Exists (1.2ms)  SELECT  1 AS one FROM "users" WHERE LOWER("users"."email") = LOWER($1) AND "users"."id" != $2 LIMIT $3  [["email", "j@gmail.com"], ["id", 1], ["LIMIT", 1]]
  2018-04-30T10:15:47.663630+00:00 app[web.1]: [79a84b63-be87-46f8-8fad-2d151a63722f]    (1.0ms)  COMMIT
  2018-04-30T10:15:47.664737+00:00 app[web.1]: [79a84b63-be87-46f8-8fad-2d151a63722f] [active_model_serializers] Rendered ActiveModel::Serializer::Null with Hash (0.51ms)
  2018-04-30T10:15:47.665015+00:00 app[web.1]: [79a84b63-be87-46f8-8fad-2d151a63722f] Completed 500 Internal Server Error in 14ms (Views: 1.1ms | ActiveRecord: 4.5ms)
  </code></pre>
  
  <p>I think that's the problem</p>
  
  <blockquote>
    <p>Rendered ActiveModel::Serializer::Null with Hash (0.51ms)</p>
  </blockquote>
  
  <p>But I don't understand what's going on.</p>
  
  <p><strong>Update</strong></p>
  
  <pre><code>module Response
      def json_response(object, status = :ok)
          render json: object, status: status
      end
  end
  </code></pre>