app/controllers/v1/answers_controller.rb
# Only allow a trusted parameter "white list" through.
Only allow a trusted parameter "white list" through.
Only allow a trusted parameter " white list " through .
def answer_params
        @created_by = current_user.id
        params[:created_by] = @created_by.to_s
        params.permit(:body, :created_by)
      end
def answer_params @created_by = current_user . id params [ :created_by ] = @created_by . to_s params . permit ( :body , :created_by ) end
Only allow a trusted parameter "white list" through.
Only allow a trusted parameter " white list " through .